DBMS Interview Questions and Answers
Question - 11 : - What do you understand by Data Model?
Answer - 11 : -
The Data model is specified as a collection of conceptual tools for describing data, data relationships, data semantics and constraints. These models are used to describe the relationship between the entities and their attributes.
There is the number of data models:
- Hierarchical data model
- network model
- relational model
- Entity-Relationship model and so on.
Question - 12 : - Define a Relation Schema and a Relation.
Answer - 12 : -
A Relation Schema is specified as a set of attributes. It is also known as table schema. It defines what the name of the table is. Relation schema is known as the blueprint with the help of which we can explain that how the data is organized into tables. This blueprint contains no data.
A relation is specified as a set of tuples. A relation is the set of related attributes with identifying key attributes
See this example:
Let r be the relation which contains set tuples (t1, t2, t3, ..., tn). Each tuple is an ordered list of n-values t=(v1,v2, ...., vn).
Question - 13 : - What is a degree of Relation?
Answer - 13 : -
The degree of relation is a number of attribute of its relation schema. A degree of relation is also known as Cardinality it is defined as the number of occurrence of one entity which is connected to the number of occurrence of other entity. There are three degree of relation they are one-to-one(1:1), one-to-many(1:M), many-to-one(M:M).
Question - 14 : - What is the Relationship?
Answer - 14 : -
The Relationship is defined as an association among two or more entities. There are three type of relationships in DBMS-
- One-To-One: Here one record of any object can be related to one record of another object.
- One-To-Many (many-to-one): Here one record of any object can be related to many records of other object and vice versa.
- Many-to-many: Here more than one records of an object can be related to n number of records of another object.
Question - 15 : - What are the disadvantages of file processing systems?
Answer - 15 : -
- Inconsistent
- Not secure
- Data redundancy
- Difficult in accessing data
- Data isolation
- Data integrity
- Concurrent access is not possible
- Limited data sharing
- Atomicity problem
Question - 16 : - What is data abstraction in DBMS?
Answer - 16 : -
Data abstraction in DBMS is a process of hiding irrelevant details from users. Because database systems are made of complex data structures so, it makes accessible the user interaction with the database.
For example: We know that most of the users prefer those systems which have a simple GUI that means no complex processing. So, to keep the user tuned and for making the access to the data easy, it is necessary to do data abstraction. In addition to it, data abstraction divides the system in different layers to make the work specified and well defined.
Question - 17 : - What are the three levels of data abstraction?
Answer - 17 : -
Following are three levels of data abstraction:
Physical level: It is the lowest level of abstraction. It describes how data are stored.
Logical level: It is the next higher level of abstraction. It describes what data are stored in the database and what the relationship among those data is.
View level: It is the highest level of data abstraction. It describes only part of the entire database.
For example- User interacts with the system using the GUI and fill the required details, but the user doesn't have any idea how the data is being used. So, the abstraction level is entirely high in VIEW LEVEL.
Then, the next level is for PROGRAMMERS as in this level the fields and records are visible and the programmers have the knowledge of this layer. So, the level of abstraction here is a little low in VIEW LEVEL.
And lastly, physical level in which storage blocks are described.
Question - 18 : - What is DDL (Data Definition Language)?
Answer - 18 : -
Data Definition Language (DDL) is a standard for commands which defines the different structures in a database. Most commonly DDL statements are CREATE, ALTER, and DROP. These commands are used for updating data into the database.
Question - 19 : - What is DML (Data Manipulation Language)?
Answer - 19 : -
DData Manipulation Language (DML) is a language that enables the user to access or manipulate data as organized by the appropriate data model. For example- SELECT, UPDATE, INSERT, DELETE.
There is two type of DML:
Procedural DML or Low level DML: It requires a user to specify what data are needed and how to get those data.
Non-Procedural DML or High level DML:It requires a user to specify what data are needed without specifying how to get those data.
Question - 20 : - Explain the functionality of DML Compiler.
Answer - 20 : -
The DML Compiler translates DML statements in a query language that the query evaluation engine can understand. DML Compiler is required because the DML is the family of syntax element which is very similar to the other programming language which requires compilation. So, it is essential to compile the code in the language which query evaluation engine can understand and then work on those queries with proper output.