DBMS & SQL Interview Roadmap
1. Basic Concepts
- What is a Database?
- Difference between DBMS and RDBMS
- Types of Databases: Hierarchical, Network, Relational, NoSQL
2. Keys
- Primary Key, Candidate Key, Super Key, Foreign Key
- Composite Key, Alternate Key
3. Normalization
- Need for Normalization
- 1NF, 2NF, 3NF, BCNF
- Functional Dependency
- Data Anomalies
4. ER Model
- Entities and Attributes, Strong vs Weak Entities
- Relationships and Cardinality (1:1, 1:N, M:N)
- ER to Relational Model
5. Transaction Management
- ACID Properties: Atomicity, Consistency, Isolation, Durability
- Transaction States, Concurrency Control (Locks, Deadlock)
- Serializability
6. Indexing
- What is Indexing?
- Clustered vs Non-Clustered Index
DBMS & SQL Interview Roadmap
- Advantages and Disadvantages
7. Joins
- INNER, LEFT, RIGHT, FULL OUTER, SELF JOIN
- Differences and Use Cases
8. Subqueries and Nested Queries
- Scalar, Row, Table Subqueries
- Correlated Subqueries
9. SQL Clauses
- SELECT, WHERE, GROUP BY, HAVING, ORDER BY
- DISTINCT, LIMIT, OFFSET
10. SQL Command Types
- DDL: CREATE, ALTER, DROP
- DML: INSERT, UPDATE, DELETE
- DCL: GRANT, REVOKE
- TCL: COMMIT, ROLLBACK, SAVEPOINT
11. Views, Stored Procedures, and Triggers
- What is a View?
- View vs Table
- Stored Procedure vs Function
- Triggers
12. Set Operations
- UNION, INTERSECT, EXCEPT
DBMS & SQL Interview Roadmap
13. Constraints
- NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY
- CHECK, DEFAULT
14. Frequently Asked Questions
- Difference between WHERE and HAVING
- Normalization vs Denormalization
- DELETE vs TRUNCATE vs DROP
- Second highest salary query
- Window Functions: ROW_NUMBER, RANK, DENSE_RANK