Commonly asked DBMS interview questions for intermediate and advance level Database Engineers

1)What are the different types of constraints in a database and how are they used?

Rules that limit the values that may be added to a table are known as constraints in databases. A database may have primary key constraints, foreign key constraints, unique constraints, check constraints, and not null constraints, among other sorts of restrictions. Foreign key constraints ensure that the values in a field match those in another table, whereas primary key constraints guarantee that each row in a table is distinct. While check constraints ensure that values in field match specific requirements, unique constraints guarantee that each value in a field is distinct. A field cannot have null values thanks to not null restrictions.

2)What is a deadlock in a database and how can it be prevented?

A deadlock in a database occurs when two or more transactions are waiting for each other to release resources, causing a deadlock or a standstill in the database. Deadlocks can be prevented by using locking mechanisms, setting transaction isolation levels appropriately, and using timeouts to detect and resolve deadlocks.

3)What is a backup and recovery plan and why is it important?

A backup and recovery plan is a collection of guidelines and practices used to safeguard database data and guarantee that it can be restored in the event of a catastrophe or system failure. The database must be regularly backed up, the backups must be kept in a safe area, and the backup and recovery processes must be tested to make sure they function as intended. In the event of a disaster or system failure, a backup and recovery strategy guarantees that crucial data is not lost or distorted and that company activities can continue.

4)What are the different types of database models and when would you use each one?

Database models can be classified as hierarchical, network, relational, object-oriented, or NoSQL. While relational databases utilize tables to store and retrieve data, hierarchical and network databases use a hierarchical or networked structure. NoSQL databases are used to store unstructured or semi-structured data types like documents or key-value pairs, whereas object-oriented databases are used to store complicated data types like objects and classes.

5)What is database normalization and what are its different normal forms?

The practice of organizing data in a database to lessen duplication and enhance data integrity is known as database normalization. It entails creating connections between enormous tables and splitting them up into smaller, more manageable ones. The first normal form (NF), second normal form (2NF), third normal form (3NF), and higher normal forms are among the several normal forms used in database normalization. Each normal form gets rid of a certain kind of data dependence and redundancy.

6)What is query optimization and how can it be achieved in a DBMS?

The practice of improving a database query's speed and cutting down on the time it takes to access data is known as query optimization. It entails reviewing the execution plan for the query, locating any possible bottlenecks, and altering the query or database structure as necessary to boost speed. Indexing, partitioning, and denormalization are a few strategies for query optimization.

7)What is the difference between a clustered and a non-clustered index?

The physical order of the entries in a table is decided by a form of an index known as a clustered index. It is built around a table's primary key or a group of columns with a different value for each row. It is possible to establish a non-clustered index on a group of columns that are commonly used as search criteria but are not the primary key. A non-clustered index does not alter the physical order of the entries in a table, in contrast to a clustered index.

8)What is a data warehouse and how is it different from a database?

A database that has been optimized for reporting and analysis is known as a data warehouse. It is made to handle sophisticated queries and analytical operations and is used to store substantial historical data from several sources. A data warehouse is designed with data retrieval and analysis in mind, as opposed to transactional databases, which are optimized for data changes and real-time transactions.

9)What are the different types of keys in a database and when would you use each one?

A database can have primary keys, foreign keys, candidate keys, and super keys, among other key types. A primary key is used to preserve data integrity and guarantee that every entry in a database has a unique identity. To maintain referential integrity and guarantee that data is consistent between linked tables, a foreign key is a field that refers to the primary key of another table. A super key is a group of fields that uniquely identifies a row in a database, whereas a candidate key is a set of fields that can be used as a primary key.

10)What is a database schema and how is it used in a DBMS?

An outline of a database's structure, including its tables, fields, and connections between them, is known as a database schema. It serves as a specification for the data contained in the database and helps maintain data integrity and consistency. Data Definition Language (DDL) statements, which are used to create, alter, and destroy database objects including tables, indexes, and constraints, may be used to change the schema.


DBMS (Database Management System) is a crucial component of contemporary computing, to sum up. Data storage, access, and administration are significantly impacted by the field of database management. In IT job interviews, DBMS-related questions are frequently asked.

The most typical DBMS interview questions have been covered in the article, ranging from fundamental ideas like the distinction between a database and a table to more complex subjects like normalization, indexing, and transactions. IT workers might be better prepared for DBMS-related job interviews by being familiar with these questions.

The article offers a thorough review of some of the most typical DBMS interview questions, and by understanding these ideas, IT professionals may improve their chances of finding employment.

Updated on: 26-Apr-2023


Kickstart Your Career

Get certified by completing the course

Get Started