1. List few advantages and disadvantages of DBMS?
Followng are few advantages
Advantages of DBMS:
- Improved Data Security
- Better Data Integration
- Minimized Data Inconsistency
- Improved Data Access
Followng are few disadvantages
Disadvantages of DBMS
- Management Complexity
- Increased Costs
- Maintaining Currency
- Frequent upgrade/replacement cycles
Source:
http://www.myreadingroom.co.in
2. What are the different types of database languages?
There are large numbers of database languages few of them Oracle,
MySQL, MS Access, dBase, FoxPro etc
SQL statements commonly used in Oracle and MS Access can be categorized as:
- Data Definition Language (DDL)
- Data Control Language (DCL)
- Data Manipulation Language (DML)
Source:
http://ecomputernotes.com
3. Explain data independence in DBMS?
Data independence is ability to modify a schema definition in one level without affecting a schema definition in the next higher level.
There are two levels of data independence:
Physical Data Independence
Logical Data Independence
These are described below:
Physical Data Independence:
- Physical Data Independence is the ability to modify the physical schema without requiring any change in application programs.
- Modifications at the internal levels are occasionally necessary to improve performance. possible modifications at internal levels are change in file structures, compression techniques, hashing algorithms, storage devices and more
Logical Data Independence
- Logical data independence is ability to modify the conceptual schema without requiring any change in application programs
- Modification at the logical levels are necessary whenever the logical structures of the database is altered
Source:
https://tutorialink.com
4. Explain what is normalization in DBMS?
Normalization is the process of minimizing redundancy from a relation or set of relations. Redundancy in relation may cause insertion, deletion and updation anomalies. So, it helps to minimize the redundancy in relations.
- First Normal Form
If a relation contain composite or multi-valued attribute, it violates first normal form or a relation is in first normal form if it does not contain any composite or multi-valued attribute. A relation is in first normal form if every attribute in that relation is singled valued attribute.
- Second Normal Form
To be in second normal form, a relation must be in first normal form and relation must not contain any partial dependency. A relation is in 2NF iff it has No Partial Dependency, i.e., no non-prime attribute (attributes which are not part of any candidate key) is dependent on any proper subset of any candidate key.
- Third Normal Form
A relation is in third normal form, if there is no transitive dependency for non-prime attributes is it is in second normal form.
A relation is in 3NF iff at least one of the following condition holds in every non-trivial function dependency X –> Y
1. X is a super key.
2. Y is a prime attribute (each element of Y is part of some candidate key).
- Boyce-Codd Normal Form (BCNF)
A relation R is in BCNF if R is in Third Normal Form and for every FD, LHS is super key. A relation is in BCNF iff in every non-trivial functional dependency X –> Y, X is a super key.
• For example consider relation R(A, B, C)
A -> BC,
B ->
A and B both are super keys so above relation is in BCNF.
Source:
https://www.geeksforgeeks.org
5. How dbms_mview refresh works?
Oracle DBMS_MVIEW is a synonym for DBMS_SNAPSHOT. Oracle DBMS_MVIEW will allow you to better understand the capabilities of Oracle materialized views. With Oracle DBMS_MVIEW you can also refresh Oracle materialized views that are not part of the same purge logs or refresh group.
Oracle 9i came with two packages, dbms_mview.explain_mview and dbms_mview.explain_rewrite that could be used to diagnose why a materialized view wasn't being used for query rewrite.
However, although these packages told you why rewrite hadn't happened, they left it down to you to work out how to alter your CREATE MATERIALIZED VIEW statement to ensure that rewrite happened correctly. Oracle Database 10g comes with a new advisor package, DBMS_ADVISOR.TUNE_MVIEW, that takes as its input a CREATE MATERIALIZED VIEW DML statement, and outputs a corrected version that supports query rewrite and features such as fast refresh.
Source:
Further Reading
6. What are benefits of using big data over DBMS?
There are many advantages of processing Big Data Analytics in real-time.
- Knowing errors instantly within the organisation.
- Implementing new strategies.
- To improve service dramatically.
- Fraud can be detected the moment it happens.
- Cost savings.
- Better sales insights.
- Keep up the customer trends.
Source:
Further Reading
7. What is Object Oriented model?
Object-oriented modeling is the process of preparing and designing what the model’s code will actually look like. During the construction or programming phase, the modeling techniques are implemented by using a language that supports the object-oriented programming model.
OOM consists of progressively developing object representation through three phases: analysis, design, and implementation. During the initial stages of development, the model developed is abstract because the external details of the system are the central focus. The model becomes more and more detailed as it evolves, while the central focus shifts toward understanding how the system will be constructed and how it should function.
Source:
https://www.techopedia.com
8. List few differences between DDL, DML and DCL?
Data Definition Language:
statements used to define the database structure or schema. Some examples:
- CREATE – to create objects in the database
- ALTER – alters the structure of the database
- DROP – delete objects from the database
- TRUNCATE – remove all records from a table, including all spaces allocated for the records are removed
- COMMENT – add comments to the data dictionary
- RENAME – rename an object
They are called Data Definition since they are used for defining the data. That is the structure of the data is known through these DDL commands.
Data Manipulation Language:
statements used for managing data within schema objects. Some examples:
- SELECT – retrieve data from the a database
- INSERT – insert data into a table
- UPDATE – updates existing data within a table
- DELETE – deletes all records from a table, the space for the records remain
- MERGE – UPSERT operation (insert or update)
- CALL – call a PL/SQL or Java subprogram
- EXPLAIN PLAN – explain access path to data
- LOCK TABLE – control concurrency
DML commands are used for data manipulation. Some of the DML commands
insert,select,update,delete etc. Even though select is not exactly a DML language command oracle still recommends you to consider SELECT as an DML command.
Data Control Language:
Some examples:
- GRANT – gives user’s access privileges to database
- REVOKE – withdraw access privileges given with the GRANT command
Data Control Language is used for the control of data. That is a user can access any data based on the priveleges given to him. This is done through DATA CONTROL
Source:
https://treasure4developer.wordpress.com
9. What is Difference between BLOB and CLOB?
BLOB :
Variable-length binary large object string that can be up to 2GB (2,147,483,647) long. Primarily intended to hold non-traditional data, such as voice or mixed media. BLOB strings are not associated with a character set, as with FOR BIT DATA strings.
CLOB :
Variable-length character large object string that can be up to 2GB (2,147,483,647) long. A CLOB can store single-byte character strings or multibyte, character-based data. A CLOB is considered a character string.
Source:
https://stackoverflow.com
Thanks for reading and good luck on your interview!
Check more DBMS Interview Questions & Answers on
https://www.onlineinterviewquestions.com