DBMS Interview Q&A
DBMS Interview Q&A
o Hierarchical DBMS
o Network DBMS
o Object-oriented DBMS
o RDBMS (Relational DBMS) stores data in tables with relationships, while DBMS
manages data without enforcing relationships strictly.
o A database schema defines the structure of the database, including tables, columns,
data types, and constraints.
5. What is normalization?
o TRUNCATE removes all rows without a condition and cannot be rolled back.
LEFT JOIN – Returns all from the left table and matching from the right.
RIGHT JOIN – Returns all from the right table and matching from the left.
FULL JOIN – Returns all records when there is a match in either table.
13. What is the difference between a primary key and a unique key?
A primary key cannot have NULL values and uniquely identifies a row.
A foreign key is a column in one table that refers to the primary key in another table to
enforce referential integrity.
A function returns a single value, while a procedure can return multiple values and execute
complex logic.
A deadlock occurs when two transactions wait for each other’s resources indefinitely.
Read Uncommitted
Read Committed
Repeatable Read
Serializable
Database Design and Normalization
Miscellaneous
Object-Relational Mapping (ORM) converts data between relational databases and object-
oriented programming.
NoSQL is a non-relational database designed for scalability and flexibility (e.g., MongoDB,
Cassandra).
1. What is denormalization?
DQL (SELECT)
INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, CROSS JOIN, SELF JOIN.
23. What is the difference between a primary key and a unique key?
Deadlock occurs when two transactions wait for each other’s resources.
A functional dependency (FD) exists when one attribute uniquely determines another.
Miscellaneous
Hash join uses a hash table for efficient joining of large tables.