DBMS Interview Questions (Product + Service Companies)
These are grouped into categories, with brief explanations to help students understand what each type of company expects and how to prepare.
1. Conceptual & Theoretical Questions (Common in Both)
These test a solid understanding of DBMS fundamentals.
Â
- What is normalization? Explain different normal forms.
- What are ACID properties in a transaction?
- What is the difference between a clustered and non-clustered index?
- What are functional, multivalued, and transitive dependencies?
- What are the different types of joins? Give examples.
- What is the difference between DELETE, TRUNCATE, and DROP?
- Explain primary key vs. unique key.
- What is a view? How does it differ from a table?
2. SQL Coding Questions (Common in Product Companies, Some Service Roles)
Â
Product companies often test SQL coding via online assessments.
Â
- Write a query to get the second highest salary from an employee table.
- Write a query to get customers who never placed an order.
- Write an SQL query to find duplicate records in a table.
- Given a sales table, write a query to find the top 3 products sold each month.
- Use window functions to rank employees based on salary within departments.
3. Design-Oriented Questions (Mostly Product-Based & Project Roles)
Â
These assess ability to design efficient databases and understand trade-offs.
Â
- Design a database schema for a food delivery app (like Swiggy or Zomato).
- How would you handle schema changes in a live production database?
- What strategies would you use to scale a DB as data grows?
- Explain indexing strategies for optimizing read-heavy systems.
- Discuss the pros and cons of SQL vs NoSQL for a messaging system.
4. Transactions & Concurrency Control (Important for Backend/System Roles)
Â
Crucial for understanding consistency in multi-user environments.
Â
- What are different transaction states in DBMS?
- Explain conflict vs. view serializability with examples.
- What is Two-Phase Locking (2PL)? What problem does it solve?
- What is deadlock? How do you detect and resolve it?
- Explain the difference between strict, cascadeless, and recoverable schedules.
5. Recovery & Logging (Advanced, Appears in Systems/Backend Roles)
- What is log-based recovery in DBMS?
- Explain the concept of checkpoints in crash recovery.
- What is shadow paging and how does it work?
- Compare deferred update and immediate update techniques.
6. Distributed Databases & NoSQL (Useful for Projects & Scalable System Interviews)
- What is the CAP theorem?
- Compare replication vs sharding.
- What is BASE in NoSQL systems?
- When would you choose MongoDB over MySQL?
- How do distributed transactions maintain consistency?