DBMS Interview Questions and Answers

DBMS Interview Questions and Answers for Freshers 2026


Database Management System (DBMS) is one of the most important subjects for students preparing for technical interviews, campus placements, software developer roles, data-related positions, and IT jobs. Freshers are commonly asked DBMS questions along with programming, SQL, operating systems, computer networks, and data structures.

Interviewers generally test whether a candidate understands fundamental database concepts and can explain them using simple real-world examples. Important areas include DBMS basics, RDBMS, keys, normalization, SQL, joins, constraints, transactions, ACID properties, indexing, and concurrency.

This guide covers commonly asked DBMS interview questions and answers for freshers in 2026. It is useful for candidates preparing for technical interviews at IT companies, software companies, startups, and campus recruitment drives.


What is DBMS?

A Database Management System (DBMS) is software used to store, organize, manage, retrieve, and update data in a database.

Instead of maintaining information in separate files, a DBMS provides a structured way to manage large amounts of data.

Examples of DBMS

Some commonly known database systems include:

  • MySQL

  • PostgreSQL

  • Oracle Database

  • Microsoft SQL Server

  • SQLite

For example, an online shopping application may use a database to store:

  • Customer details

  • Product information

  • Orders

  • Payments

  • Delivery details

A DBMS helps applications efficiently access and manage this information.


Top DBMS Interview Questions and Answers for Freshers

1. What is the difference between DBMS and RDBMS?

DBMS is a general database management system used to manage data.

RDBMS, or Relational Database Management System, stores data primarily in tables and establishes relationships between those tables.

For example, an employee database may contain separate tables for:

  • Employees

  • Departments

  • Projects

  • Salaries

The tables can be connected using keys.

Simple difference:

DBMS: Manages databases.

RDBMS: Manages relational databases using tables and relationships.


2. What is a database?

A database is an organized collection of data that can be stored, accessed, managed, and updated efficiently.

For example, a college database may contain student names, roll numbers, courses, marks, attendance, and contact information.

A DBMS provides the tools required to interact with this database.


3. What is a table in a database?

A table is a structured collection of data arranged into rows and columns.

For example:

Student_IDNameCourseMarks
101RahulB.Tech85
102PriyaB.Tech91
103ArjunBCA78

Here, each row represents a record, while each column represents an attribute.


4. What is a primary key?

A primary key is a column or combination of columns that uniquely identifies every record in a table.

For example:

CREATE TABLE Students (
    student_id INT PRIMARY KEY,
    name VARCHAR(100),
    course VARCHAR(50)
);

Here, student_id is the primary key.

A primary key:

  • Must uniquely identify records

  • Cannot contain NULL values

  • Can consist of one or more columns

  • Provides an important identity for each row


5. What is a foreign key?

A foreign key is a column that establishes a relationship between two tables by referencing a key in another table.

For example, suppose we have:

Department

department_iddepartment_name
1IT
2HR

Employee

employee_idnamedepartment_id
101Ravi1
102Sneha2

Here, department_id in the Employee table can act as a foreign key referencing the Department table.

Foreign keys help maintain referential integrity between related tables.


6. What is a candidate key?

A candidate key is a minimal set of attributes that can uniquely identify a record.

A table can have multiple candidate keys, but only one is generally selected as the primary key.

Example

Suppose an Employee table has:

  • Employee_ID

  • Email

  • Phone_Number

If all three values are unique, each may potentially serve as a candidate key.

The database designer can choose Employee_ID as the primary key.


7. What is a composite key?

A composite key consists of two or more columns used together to uniquely identify a record.

For example, consider an enrollment table:

Student_IDCourse_IDGrade
101C01A
101C02B
102C01A

Neither Student_ID nor Course_ID alone may uniquely identify a record.

Therefore, (Student_ID, Course_ID) can be used as a composite key.


DBMS Normalization Interview Questions

8. What is normalization?

Normalization is the process of organizing data into tables to reduce unnecessary duplication and improve data consistency.

The major goals of normalization are to:

  • Reduce data redundancy

  • Improve data consistency

  • Avoid update anomalies

  • Avoid insertion anomalies

  • Avoid deletion anomalies

Normalization is one of the most frequently discussed topics in DBMS interviews.


9. What is 1NF?

First Normal Form (1NF) requires that each column contains atomic or indivisible values and that repeating groups are avoided.

Not in 1NF:

Student_IDNameSubjects
101RaviJava, SQL, Python

The Subjects column contains multiple values.

A better design is to store individual subject records separately.


10. What is 2NF?

A table is in Second Normal Form (2NF) when it is already in 1NF and has no partial dependency on part of a composite key.

This concept is especially important when a table has a composite key.

For example, if (Student_ID, Course_ID) is the key but Student_Name depends only on Student_ID, there is a partial dependency.

The table should be redesigned to remove that dependency.


11. What is 3NF?

A table is in Third Normal Form (3NF) when it is in 2NF and does not contain inappropriate transitive dependencies.

For example:

Employee_ID → Department_ID

and

Department_ID → Department_Name

This means Department_Name indirectly depends on Employee_ID through Department_ID.

Separating employee and department information can eliminate this transitive dependency.


12. What is denormalization?

Denormalization is the intentional introduction of some redundancy into a database to improve read performance or simplify certain queries.

Normalization focuses on reducing unnecessary duplication, while denormalization may deliberately duplicate information when performance or application requirements justify it.

The important interview point is that denormalization involves a trade-off: faster or simpler reads may come at the cost of additional storage and more complicated updates.


SQL and DBMS Interview Questions

13. What is SQL?

SQL, or Structured Query Language, is used to interact with relational databases.

SQL can be used to:

  • Create tables

  • Insert data

  • Update records

  • Delete records

  • Retrieve information

  • Define constraints

  • Manage database objects

Example:

SELECT * FROM Employees;

This query retrieves records from the Employees table.


14. What is the difference between DELETE, TRUNCATE and DROP?

This is a very common interview question.

DELETE

DELETE removes selected rows from a table and can be used with a WHERE condition.

DELETE FROM Employees
WHERE employee_id = 101;

TRUNCATE

TRUNCATE removes all rows from a table while keeping the table structure.

TRUNCATE TABLE Employees;

DROP

DROP removes the database object itself.

DROP TABLE Employees;

Therefore:

DELETE → removes rows

TRUNCATE → removes all rows

DROP → removes the table/object

Exact transactional and recovery behavior can vary by database system, so interview answers should avoid claiming that these commands behave identically across every SQL implementation.


15. What is a JOIN?

A JOIN is used to combine related data from two or more tables.

For example, an Employee table may contain department_id, while a Department table contains department names.

A JOIN can combine these records.

Common types include:

  • INNER JOIN

  • LEFT JOIN

  • RIGHT JOIN

  • FULL OUTER JOIN

  • CROSS JOIN


16. What is an INNER JOIN?

An INNER JOIN returns records that have matching values in both tables.

Example:

SELECT Employees.name, Departments.department_name
FROM Employees
INNER JOIN Departments
ON Employees.department_id = Departments.department_id;

This returns employees whose department has a matching record.


17. What is a LEFT JOIN?

A LEFT JOIN returns all records from the left table and matching records from the right table.

If there is no matching record on the right side, the corresponding columns can contain NULL.

This is useful when you want to find records from one table even when related information is missing.


Transaction and ACID Interview Questions

18. What is a transaction?

A transaction is a sequence of database operations treated as one logical unit of work.

A bank transfer is a common example.

Suppose ₹1,000 is transferred from Account A to Account B.

The transaction may involve:

  1. Deduct ₹1,000 from Account A.

  2. Add ₹1,000 to Account B.

  3. Commit the transaction.

Both operations should be handled as one logical unit.


19. What are ACID properties?

ACID stands for:

  • Atomicity

  • Consistency

  • Isolation

  • Durability

These properties help make database transactions reliable.

Atomicity

Atomicity means a transaction is treated as an all-or-nothing operation.

If a bank transfer fails halfway through, the database should not leave the transfer in an unintended partial state.

Consistency

Consistency means a successful transaction should preserve the database's defined rules and constraints.

Isolation

Isolation controls how concurrent transactions interact with one another so that incomplete work does not improperly interfere with other transactions.

Durability

Durability means that after a transaction is successfully committed, its changes should survive a system failure.

Easy way to remember:

A – All or nothing

C – Correct state

I – Independent execution

D – Data remains after commit


Indexing Questions

20. What is an index in DBMS?

An index is a database structure designed to help the database locate rows more efficiently for suitable queries.

It is similar to the index of a book.

Without an index, the database may need to inspect many rows to find matching information. With a suitable index, it can often locate relevant records more efficiently.

However, indexes are not free. They require additional storage and can increase the cost of data modifications because the index may also need to be updated.


21. What are the advantages of indexing?

Indexes can:

  • Improve search performance

  • Speed up suitable filtering operations

  • Improve some JOIN operations

  • Help with ordering and grouping in appropriate cases

  • Reduce the amount of data that needs to be examined

However, creating indexes on every column is not necessarily a good practice. The best indexes depend on actual query patterns and database workload.


Constraints in DBMS

22. What are database constraints?

Constraints are rules applied to data to maintain accuracy and integrity.

Common constraints include:

  • PRIMARY KEY

  • FOREIGN KEY

  • UNIQUE

  • NOT NULL

  • CHECK

  • DEFAULT

For example:

CREATE TABLE Employee (
    employee_id INT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    age INT CHECK (age >= 18)
);

Here, the database applies rules to ensure that the data satisfies the defined conditions.


23. What is a UNIQUE constraint?

A UNIQUE constraint ensures that values in the constrained column or column combination do not violate the database's uniqueness rules.

For example:

CREATE TABLE Users (
    user_id INT PRIMARY KEY,
    email VARCHAR(150) UNIQUE
);

This can be used when email addresses should be unique.

The exact treatment of NULL values under UNIQUE constraints can differ between database systems, so candidates should be careful when discussing vendor-specific behavior.


Advanced DBMS Interview Questions for Freshers

24. What is a deadlock?

A deadlock occurs when two or more transactions are waiting for resources held by one another, so none can continue.

For example:

  • Transaction A locks Resource 1 and waits for Resource 2.

  • Transaction B locks Resource 2 and waits for Resource 1.

Both transactions remain blocked.

Database systems use different mechanisms to detect, prevent, or resolve deadlocks.


25. What is concurrency control?

Concurrency control manages simultaneous database operations so that transactions can work safely without producing incorrect results.

It is important when many users access or modify the database at the same time.

Concurrency problems can include:

  • Dirty reads

  • Non-repeatable reads

  • Phantom reads

  • Lost updates

Understanding these problems is useful for technical interviews involving transactions and database systems.


26. What is a view?

A view is a virtual representation of data based on a query.

Example:

CREATE VIEW Employee_View AS
SELECT employee_id, name
FROM Employees;

A view can simplify frequently used queries and can help restrict access to selected columns or rows.


27. What is a schema?

A schema describes the structure of a database.

It can include:

  • Tables

  • Columns

  • Data types

  • Constraints

  • Relationships

  • Views

  • Other database objects

A simple way to understand it is:

Database = stored data

Schema = structure and rules describing the data


28. What is referential integrity?

Referential integrity ensures that relationships between related tables remain valid.

For example, if an Employee record contains a department_id, that department should exist in the referenced Department table when the foreign-key relationship requires it.

This prevents invalid references and orphaned records.


Frequently Asked DBMS Questions for Freshers

29. What is the difference between primary key and foreign key?

A primary key uniquely identifies records in its own table.

A foreign key references a key in another table and is used to establish relationships.

30. What is the difference between primary key and unique key?

A table can have one primary key constraint, while it can have multiple UNIQUE constraints. A primary key cannot contain NULL values; NULL handling for UNIQUE constraints depends on the database system.

31. What is an entity?

An entity is a distinguishable real-world object or concept represented in a database.

Examples:

  • Student

  • Employee

  • Customer

  • Product

32. What is an attribute?

An attribute describes a property of an entity.

For an Employee entity, attributes may include:

  • Employee_ID

  • Name

  • Email

  • Salary

  • Department

33. What is an ER diagram?

An Entity-Relationship (ER) diagram is a visual representation of entities, their attributes, and relationships.

It is commonly used during database design.

34. What is cardinality?

Cardinality describes how entities participate in a relationship.

Common relationship types include:

  • One-to-One

  • One-to-Many

  • Many-to-One

  • Many-to-Many

35. What is a many-to-many relationship?

A many-to-many relationship occurs when multiple records in one table can relate to multiple records in another table.

For example:

Students ↔ Courses

One student can take multiple courses, and one course can have multiple students.

A junction or bridge table is commonly used to implement this relationship.


How to Prepare for DBMS Interviews as a Fresher

Learning definitions alone is not enough. A good preparation strategy is to understand the reason behind every concept.

Step 1: Learn the fundamentals

Start with:

  • Database

  • DBMS

  • RDBMS

  • Tables

  • Rows

  • Columns

  • Schema

  • Keys

  • Constraints

Step 2: Practice normalization

Make sure you understand:

  • 1NF

  • 2NF

  • 3NF

  • BCNF

  • Functional dependency

  • Data redundancy

  • Update, insertion, and deletion anomalies

Normalization questions often become easier when you practice with small tables rather than memorizing definitions.

Step 3: Practice SQL

Focus on:

  • SELECT

  • WHERE

  • GROUP BY

  • HAVING

  • ORDER BY

  • Aggregate functions

  • JOINs

  • Subqueries

  • INSERT

  • UPDATE

  • DELETE

Step 4: Understand transactions

Prepare:

  • Transactions

  • ACID

  • COMMIT

  • ROLLBACK

  • SAVEPOINT

  • Isolation

  • Concurrency

  • Deadlocks

Step 5: Learn indexing

Understand why indexes are used, their benefits and trade-offs, and how they can affect query performance.

Step 6: Practice explaining answers

During an interview, try to answer in this order:

Definition → Example → Practical use

For example:

"Normalization is the process of organizing data to reduce unnecessary redundancy. For example, department information can be stored separately from employee information rather than repeating the department name for every employee. This improves consistency and reduces certain update anomalies."

This type of answer demonstrates understanding rather than memorization.


DBMS Interview Preparation Checklist

Before attending your technical interview, make sure you can confidently explain:

  • What is DBMS?

  • DBMS vs RDBMS

  • Database and table

  • Primary key

  • Foreign key

  • Candidate key

  • Super key

  • Composite key

  • Normalization

  • 1NF, 2NF and 3NF

  • BCNF

  • Denormalization

  • SQL

  • DDL, DML and DCL

  • JOINs

  • Subqueries

  • DELETE vs TRUNCATE vs DROP

  • Constraints

  • Transactions

  • ACID properties

  • Indexing

  • Views

  • Schema

  • ER diagrams

  • Cardinality

  • Referential integrity

  • Concurrency

  • Deadlocks

These topics provide a strong foundation for fresher-level DBMS technical interviews. Current interview-preparation resources similarly emphasize keys, normalization, SQL and joins, transactions, indexing, and concurrency as core areas.


Final Tips for Freshers

DBMS is an important technical interview subject, but you do not need to memorize hundreds of definitions. Focus on understanding the concepts and explaining them with simple examples.

If an interviewer asks a follow-up question, do not rush to give a memorized answer. Think about what problem the database concept is solving.

For example, when asked about normalization, explain why redundancy can cause problems. When asked about indexes, explain why they can improve suitable queries and why they also have maintenance costs. When asked about ACID, use a practical transaction such as a bank transfer.

Also practice writing SQL queries by hand. Many technical interviews combine DBMS theory with SQL query-writing, so preparing only theoretical definitions may not be enough.

For freshers, a strong DBMS preparation strategy is:

Learn the concept → Understand the reason → Practice an example → Write SQL → Explain it aloud.

With consistent practice, these DBMS concepts can become much easier to handle during technical interviews.


Frequently Asked Questions (FAQs)

Is DBMS important for freshers?

Yes. DBMS is a core computer science subject and is commonly included in technical interview preparation for IT and software roles.

Which DBMS topics should freshers study first?

Start with DBMS basics, keys, constraints, normalization, SQL, joins, transactions, ACID properties, and indexing.

Are DBMS and SQL the same?

No. DBMS is the software/system used to manage databases, while SQL is a language commonly used to interact with relational databases.

Is normalization important for interviews?

Yes. Candidates should understand at least 1NF, 2NF, 3NF, functional dependencies, anomalies, and the basic idea of BCNF.

Should freshers learn SQL along with DBMS?

Absolutely. DBMS concepts and SQL are closely related in many technical interviews, and candidates should practice both theory and query writing.


Conclusion

DBMS is one of the most valuable technical subjects for freshers preparing for IT and software interviews. A strong understanding of keys, normalization, SQL, joins, constraints, transactions, ACID properties, indexing, and concurrency can help candidates answer a wide range of technical questions.

Instead of memorizing answers word-for-word, focus on understanding the concepts and practicing practical examples. This will make it easier to handle follow-up questions and explain your answers confidently.

Keep practicing DBMS along with SQL, programming, data structures, operating systems, and computer networks to build a well-rounded technical interview preparation plan.

Disclaimer: This article is provided for educational and interview-preparation purposes. Interview questions and selection processes can vary by company, role, location, and recruitment drive. Candidates should always verify role-specific requirements from the relevant employer or official recruitment communication.

Post a Comment

0 Comments