DBMS Interview Questions

dbms interview questions

There are many expectations from your families and friends when it comes to giving an interview and getting a job in your desired field. Although there will be a lot of stress on you to crack the interviews, the feel of getting a job and sitting in the interview room is amazing. In order to help you in making your parents, loved ones, and friends proud, we have come up with DBMS Interview Questions and answers that will help you to learn what types of questions are asked in the interview and how you can answer it satisfying the interviewer.

About DBMS

DBMS or Database Management System is a platform where you can store and retrieve data of the users by considering various accurate security measures. It permits users to build their own databases based on their requirements. It comprises of various groups of applications and programs that manipulate the data present in the database and give an interface within the database itself which allows the user to extract the data.

Best DBMS Interview Questions of 2020

1. What is DBMS?

DBMS (Database Management System) is a computer software application that allows users and other applications to view, monitor and analyze data. It is an application to handle data on various subjects.

2. What are the importance of partitioning in DBMS?

Database partitioning is the process of splitting large tables into smaller database entities. Following are the benefits of partitioning-

  • When rows are in one partition, query performance in such situations is improved.
  • It also helps to access large parts of single partition.
  • Data which are rarely used can be stored in slower and cheaper storage medium.

3. What are different cursor types in DBMS?

A database cursor enables traversal over the records in database. The different cursor types are-

  • Dynamic it is highly subject to changes while scrolling the cursor in database.
  • Static it doesn’t show any changes while scrolling. It also works on recording of snapshot.
  • Keyset it enables the user to modify the data without displaying the new data.

4. State some commands of DDL in DBMS ?

DDL commands are used to modify and edit the structure of a database system. Some of the important commands are-

  1. CREATE table command- It defines each column of the table in a unique and distinct manner like name, data type, size, etc.

    Syntax: CREATE TABLE [column name] ([column definitions]) [table parameters]

  2. ALTER table command- ALTER is used to make changes and edit the existing table of database. Syntax: ALTER objecttype objectname parameters.

  3. DROP table command – DROP is used for destroying a table and all the recorded data in it. It destroys an existing database.  Syntax: DROP objecttype objectname parameters.

5. Mention some advantages of using DBMS.

DBMS is a structure that manages and handles large volumes of data stored in database. it serves as an intermediate between users and the database. Following are few advantages of database management system-

  • Data redundancy- this happens when multiple copies of data is stored. With DBMS, data is stored in one structure database and the data is inputted only once.
  • No unauthorized access- it discourages unauthorized access and improves data access.
  • Supports multiple user interfaces.
  • Minimized data inconsistency- In DBMS, data inconsistency is reduced as different versions of same data doesn’t appear in different places.

6. Enlist various types of interactions created by DBMS?

There are various kinds of interactions supported by DBMS like-

  • Data definition
  • Update
  • Retrieval
  • Administration

7. Write down the differences between NoSQL and RDBMS?

Following is a list of the differences between NoSQL and RDBMS: –

  • In terms of data format, NoSQL does not follow any order for its data format. Whereas, RDBMS is more organized and structured when it comes to the format of its data.
  • When it comes to scalability, NoSQL is more very good and more scalable. Whereas, RDBMS is average and less scalable than NoSQL.
  • For querying of data, NoSQL is limited in terms of querying because there is no join clause present in NoSQL. Whereas, querying can be used in RDBMS as it uses the structured query language.
  • The difference in the storage mechanism of NoSQL and RDBMS is that, NoSQL uses key value pair, documents, column storage, etc. for storage. Whereas, RDBMS uses various tables for storing data and relationships.

8. What do you understand by Data Model?

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.

9. Define a Relation Schema and a Relation.

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).

10. What is a degree of Relation?

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).

11. What is the Relationship?

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.

12. What are the disadvantages of file processing systems?

  • Inconsistent
  • Not secure
  • Data redundancy
  • Difficult in accessing data
  • Data isolation
  • Data integrity
  • Concurrent access is not possible
  • Limited data sharing
  • Atomicity problem

13. What is data abstraction in DBMS?   

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.

14. What are the three levels of data abstraction?

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.

15. What is DDL (Data Definition Language)?

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.

16. What is DML (Data Manipulation Language)?

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.

17. Explain the functionality of DML Compiler. 

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.

18. What is Relational Algebra?

Relational Algebra is a Procedural Query Language which contains a set of operations that take one or two relations as input and produce a new relationship. Relational algebra is the basic set of operations for the relational model. The decisive point of relational algebra is that it is similar to the algebra which operates on the number.

There are few fundamental operations of relational algebra:

  • select
  • project
  • set difference
  • union
  • rename,etc.

19. What is Relational Calculus?

mathematics fundamentals such as algebra, differential, integration, etc. That's why it is also known as predicate calculus.

There is two type of relational calculus:

  • Tuple relational calculus
  • Domain relational calculus

20. What do you understand by query optimization?

The term query optimization specifies an efficient execution plan for evaluating a query that has the least estimated cost. The concept of query optimization came into the frame when there were a number of methods, and algorithms existed for the same task then the question arose that which one is more efficient and the process of determining the efficient way is known as query optimization.

There are many benefits of query optimization:

  • It reduces the time and space complexity.
  • More queries can be performed as due to optimization every query comparatively takes less time.
  • User satisfaction as it will provide output fast

21. What do you mean by durability in DBMS?

Once the DBMS informs the user that a transaction has completed successfully, its effect should persist even if the system crashes before all its changes are reflected on disk. This property is called durability. Durability ensures that once the transaction is committed into the database, it will be stored in the non-volatile memory and after that system failure cannot affect that data anymore.

22. What is normalization?

Normalization is a process of analysing the given relation schemas according to their functional dependencies. It is used to minimize redundancy and also used to minimize insertion, deletion and update distractions. Normalization is considered as an essential process as it is used to avoid data redundancy, insertion anomaly, updation anomaly, deletion anomaly.

There most commonly used normal forms are:

  • First Normal Form(1NF)
  • Second Normal Form(2NF)
  • Third Normal Form(3NF)
  • Boyce & Codd Normal Form(BCNF)

23. What is Denormalization?

Denormalization is the process of boosting up database performance and adding of redundant data which helps to get rid of complex data. Denormalization is a part of database optimization technique. This process is used to avoid the use of complex and costly joins. Denormalization doesn't refer to the thought of not to normalize instead of that denormalization takes place after normalization. In this process, firstly the redundancy of the data will be removed using normalization process than through denormalization process we will add redundant data as per the requirement so that we can easily avoid the costly joins.

24. What is functional Dependency?

Functional Dependency is the starting point of normalization. It exists when a relation between two attributes allow you to determine the corresponding attribute's value uniquely. The functional dependency is also known as database dependency and defines as the relationship which occurs when one attribute in a relation uniquely determines another attribute. It is written as A->B which means B is functionally dependent on A.

25. What is the E-R model? 

E-R model is a short name for the Entity-Relationship model. This model is based on the real world. It contains necessary objects (known as entities) and the relationship among these objects. Here the primary objects are the entity, attribute of that entity, relationship set, an attribute of that relationship set can be mapped in the form of E-R diagram.

In E-R diagram, entities are represented by rectangles, relationships are represented by diamonds, attributes are the characteristics of entities and represented by ellipses, and data flow is represented through a straight line.

26. What is an entity?

The Entity is a set of attributes in a database. An entity can be a real-world object which physically exists in this world. All the entities have their attribute which in the real world considered as the characteristics of the object.

For example: In the employee database of a company, the employee, department, and the designation can be considered as the entities. These entities have some characteristics which will be the attributes of the corresponding entity.

27. What is an Entity type?

An entity type is specified as a collection of entities, having the same attributes. Entity type typically corresponds to one or several related tables in the database. A characteristic or trait which defines or uniquely identifies the entity is called entity type.

For example, a student has student_id, department, and course as its characteristics.

28. What is an Entity set?

The entity set specifies the collection of all entities of a particular entity type in the database. An entity set is known as the set of all the entities which share the same properties.

For example, a set of people, a set of students, a set of companies, etc.

29. What is an Extension of entity type?

An extension of an entity type is specified as a collection of entities of a particular entity type that are grouped into an entity set.

30. What is Weak Entity set? 

An entity set that doesn't have sufficient attributes to form a primary key is referred to as a weak entity set. The member of a weak entity set is known as a subordinate entity. Weak entity set does not have a primary key, but we need a mean to differentiate among all those entries in the entity set that depend on one particular strong entity set.

Career scopes and salary scale

With an enormous amount of data in the market, it has become difficult for the companies to manage the platforms of DBMS. Therefore, the scopes in this specific field have increased to a significant extent during these days and there are many companies who are searching for candidates who can handle their data and manage it with ease. If you are a fresher and looking to pursue your career in this field, then there are many opportunities for you waiting in the market. If you know to use and implement SQL formulas, then you can get paid up to 20,000 to 60,000 dollars as a fresher in the market per annum. If you are an experienced individual, then it depends on the previous withdrawn salary and the hike that you are expecting from the companies. Usually, you can get up to 30 to 40 percent hike if you have appropriate skill sets and expertise.

Conclusion

In this article, you will learn about the DBMS interview questions and answers that will help you to crack the interviews confidently. If you want to get in touch with us for any query that you have, then you can write to us at any given time. We will acknowledge your query and answer it within a short period of time.

Intellinuts Terms : A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z