Top DBMS Interview Questions & Answers (2026)

📘 Beginner 52 Questions 🎯 Fresher Friendly 🕒 Updated Mar 2026

1. Limitations of File-Based Systems

File-based systems store data in individual files for each application. Limitations include:

  1. Data Redundancy & Inconsistency

    • Same data may be stored in multiple files, causing duplication and inconsistencies.

  2. Difficulty in Data Access

    • Accessing data requires writing custom programs. Complex queries are hard to implement.

  3. Data Isolation

    • Data is scattered across files, making it difficult to access data across multiple files.

  4. Integrity Problems

    • Hard to enforce data integrity (like unique IDs or constraints) in file-based systems.

  5. Concurrent Access Issues

    • Multiple users cannot safely access or update files at the same time.

  6. Security Issues

    • File-based systems have limited support for user authentication and access control.


2. How Database Approach Resolves Limitations

File-Based System LimitationDBMS Solution
Data redundancy & inconsistencyDBMS stores centralized data, reducing duplication.
Difficulty in data accessProvides query languages (like SQL) for easy data retrieval.
Data isolationUnified database structure allows access to related data across tables.
Integrity problemsDBMS enforces constraints like primary keys, foreign keys, and rules.
Concurrent access issuesDBMS handles multi-user concurrency control and transactions.
Security issuesDBMS provides user authentication and access control mechanisms.

3. Physical Architecture of a DBMS

The physical architecture defines how data and DBMS components are organized and accessed:

Components:
  1. Hardware

    • Servers, storage devices, CPU, memory where DBMS and data reside.

  2. DBMS Software

    • Core system managing database operations:

      • Storage Manager: Manages data storage, buffering, and retrieval.

      • Query Processor: Parses and executes queries.

      • Transaction Manager: Ensures ACID properties.

  3. Data

    • Stored in files or tables on storage devices.

    • Organized logically into tables, indexes, views.

  4. Users / Applications

    • End Users: Use applications to interact with DBMS.

    • Application Programs: Connect via APIs (like JDBC) to perform operations.


Physical Architecture Diagram (Simplified)

[Users / Applications] | [Query Processor] | [Transaction Manager] | [Storage Manager] | [Data Files]
  • Queries from users pass through the query processortransaction manager ensures consistency → storage manager handles reading/writing to physical storage.


Summary:

  • File-based systems have redundancy, inconsistency, poor security, and limited access.

  • DBMS centralizes data, enforces constraints, supports concurrency, and provides easy access.

  • Physical architecture includes users, DBMS software, and storage hardware interacting to manage data efficiently.

💡 Interview Tip: Keep answers structured and give real examples.

(i) Key Constraints

  • A key is an attribute (or set of attributes) that uniquely identifies a tuple (row) in a relation (table).

  • Constraint: No two tuples can have the same value for the key.

Example:
Table: Student(ID, Name, Age)

  • Key: ID → ensures each student has a unique ID.

IDNameAge
101John20
102Alice21

(ii) Domain Constraints

  • A domain constraint specifies that values of an attribute must come from a predefined domain (type or set of allowed values).

Example:

  • Age in Student table → must be an integer between 18 and 25.

  • Gender → only Male or Female.


(iii) Candidate Key

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

  • A relation can have multiple candidate keys; one is chosen as the primary key.

Example:
Table: Student(ID, RollNo, Email, Name)

  • Candidate keys: ID, RollNo, Email → any of these can uniquely identify a student.


(iv) Select Operation (σ)

  • Select (σ) returns tuples that satisfy a given condition.

  • Notation: σ_condition(Relation)

Example:
Table: Student(ID, Name, Age)

  • Query: σ_Age>20(Student) → Students with Age > 20

IDNameAge
102Alice21

(v) Project Operation (π)

  • Project (π) returns specific columns (attributes) from a relation.

  • Notation: π_attributeList(Relation)

Example:
Table: Student(ID, Name, Age)

  • Query: π_Name(Student) → Only names of students

Name
John
Alice

(vi) Equijoin Operation

  • Combines tuples from two relations based on equality of attributes.

Example:
Table1: Student(ID, Name)
Table2: Marks(ID, Score)

  • Query: Join on IDStudent ⨝ Student.ID = Marks.ID Marks

IDNameScore
101John80
102Alice90

(vii) Set Difference Operation (-)

  • Returns tuples in one relation but not in another.

Example:
Table1: AllStudents(ID) → {101, 102, 103}
Table2: PassedStudents(ID) → {101, 102}

  • AllStudents - PassedStudents → {103}


(viii) Referential Integrity Constraint

  • Ensures foreign key values in one table exist as primary key values in another table.

  • Prevents orphan records.

Example:
Table1: Student(ID, Name) → Primary Key: ID
Table2: Marks(StudentID, Score)StudentID is foreign key referencing Student(ID)

  • Marks.StudentID must exist in Student.ID.

💡 Interview Tip: Keep answers structured and give real examples.

DBMS is software used to store, manage, and retrieve data efficiently.
💡 Interview Tip: Keep answers structured and give real examples.

RDBMS stores data in tables with rows and columns and supports relationships between them.
💡 Interview Tip: Keep answers structured and give real examples.

A database is an organized collection of structured data stored electronically.
💡 Interview Tip: Keep answers structured and give real examples.

A table stores data in rows and columns inside a database.
💡 Interview Tip: Keep answers structured and give real examples.

A primary key uniquely identifies each record and cannot be NULL.
💡 Interview Tip: Keep answers structured and give real examples.

A foreign key links one table to another and enforces referential integrity.
💡 Interview Tip: Keep answers structured and give real examples.

A candidate key is any attribute that can uniquely identify a row in a table.
💡 Interview Tip: Keep answers structured and give real examples.

A super key is a set of one or more attributes that uniquely identifies each row.
💡 Interview Tip: Keep answers structured and give real examples.

A composite key uses two or more columns to uniquely identify a record.
💡 Interview Tip: Keep answers structured and give real examples.

NULL represents missing, unknown, or undefined data.
💡 Interview Tip: Keep answers structured and give real examples.

SQL is Structured Query Language used to communicate with databases.
💡 Interview Tip: Keep answers structured and give real examples.

DDL commands define structure: CREATE, ALTER, DROP.
💡 Interview Tip: Keep answers structured and give real examples.

DML commands manipulate data: SELECT, INSERT, UPDATE, DELETE.
💡 Interview Tip: Keep answers structured and give real examples.

DCL commands control permissions: GRANT, REVOKE.
💡 Interview Tip: Keep answers structured and give real examples.

A view is a virtual table created using a SQL query.
💡 Interview Tip: Keep answers structured and give real examples.

Normalization reduces data redundancy and improves data integrity.
💡 Interview Tip: Keep answers structured and give real examples.

Denormalization improves read speed by adding redundant data.
💡 Interview Tip: Keep answers structured and give real examples.

1NF requires atomic values and no repeating groups.
💡 Interview Tip: Keep answers structured and give real examples.

2NF removes partial dependency from composite primary keys.
💡 Interview Tip: Keep answers structured and give real examples.

3NF removes transitive dependencies among non-key attributes.
💡 Interview Tip: Keep answers structured and give real examples.

BCNF is a stricter form of 3NF ensuring every determinant is a candidate key.
💡 Interview Tip: Keep answers structured and give real examples.

A transaction is a set of operations executed as a single logical unit.
💡 Interview Tip: Keep answers structured and give real examples.

Atomicity, Consistency, Isolation, Durability ensure reliable transactions.
💡 Interview Tip: Keep answers structured and give real examples.

A join combines rows from two or more tables based on related columns.
💡 Interview Tip: Keep answers structured and give real examples.

INNER returns matching records; LEFT returns all left records plus matches.
💡 Interview Tip: Keep answers structured and give real examples.

Referential integrity ensures foreign keys correctly reference primary keys.
💡 Interview Tip: Keep answers structured and give real examples.

An index improves search speed using data structures like B-Trees.
💡 Interview Tip: Keep answers structured and give real examples.

Clustered index sorts and stores table data physically.
💡 Interview Tip: Keep answers structured and give real examples.

Non-clustered index stores pointers to actual data rows.
💡 Interview Tip: Keep answers structured and give real examples.

Stored procedure is precompiled SQL code stored inside the database.
💡 Interview Tip: Keep answers structured and give real examples.

Trigger executes automatically on INSERT, UPDATE, or DELETE operations.
💡 Interview Tip: Keep answers structured and give real examples.

A cursor handles row-by-row processing in SQL.
💡 Interview Tip: Keep answers structured and give real examples.

DELETE removes rows one by one; TRUNCATE removes all rows instantly.
💡 Interview Tip: Keep answers structured and give real examples.

NATURAL JOIN joins based on same column names; INNER JOIN requires explicit condition.
💡 Interview Tip: Keep answers structured and give real examples.

Schema defines database structure including tables, constraints, and relationships.
💡 Interview Tip: Keep answers structured and give real examples.

Deadlock occurs when two transactions wait indefinitely for each other to release locks.
💡 Interview Tip: Keep answers structured and give real examples.

Use timeouts, lock ordering, and smaller transactions to avoid deadlock.
💡 Interview Tip: Keep answers structured and give real examples.

2PC ensures distributed transactions are consistent across multiple databases.
💡 Interview Tip: Keep answers structured and give real examples.

Concurrency control manages simultaneous transactions to maintain consistency.
💡 Interview Tip: Keep answers structured and give real examples.

Locking restricts access to data to maintain consistency during transactions.
💡 Interview Tip: Keep answers structured and give real examples.

Shared lock allows read; exclusive lock allows write and blocks others.
💡 Interview Tip: Keep answers structured and give real examples.

Indexes speed reads but slow writes and require extra storage.
💡 Interview Tip: Keep answers structured and give real examples.

Hashing maps keys to memory addresses for fast record retrieval.
💡 Interview Tip: Keep answers structured and give real examples.

RAID is a disk storage technique improving reliability and performance.
💡 Interview Tip: Keep answers structured and give real examples.

OLTP handles real-time transaction-based operations.
💡 Interview Tip: Keep answers structured and give real examples.

OLAP supports analytical and complex queries used for reporting.
💡 Interview Tip: Keep answers structured and give real examples.

OLTP is transactional; OLAP is analytical for decision making.
💡 Interview Tip: Keep answers structured and give real examples.

A surrogate key is an artificially generated unique identifier.
💡 Interview Tip: Keep answers structured and give real examples.

Data independence allows schema changes without affecting applications.
💡 Interview Tip: Keep answers structured and give real examples.

Includes external, conceptual, and internal levels representing views, structure, and physical storage.
💡 Interview Tip: Keep answers structured and give real examples.
Share this Post
📝 Practice These Questions

Test yourself in quiz mode before the interview.

Start Practice Quiz
🏆

Monthly Challenge

Compete with top learners & win exciting prizes

LIVE NOW
🎁 Rewards + Certificate Participate →

Popular Competitive Exam Quizzes