Interview Q&A / SQL & DBMS
SQL & DBMS interview questions
Joins, keys, normalisation, indexes and transactions for placement and backend interviews.
Prefer rapid revision? Practise SQL & DBMS short interview answers →
- What are the ACID properties of a transaction?
ACID stands for Atomicity, Consistency, Isolation and Durability. A transaction either fully happens or not at all, leaves the data valid according to its rules, behaves as if it ran without interference from other transactions, and stays saved once committed, even if the server crashes.
BeginnerIn-depth3 min read - What are insertion, update and deletion anomalies?
They are problems in a badly designed table where redundant data forces you to add dummy values, edit many rows for one change, or lose unrelated facts when deleting a row. Normalization removes them.
BeginnerQuick answer1 min read - What does a table need to be in First Normal Form, and what breaks it?
A table is in 1NF when every column holds a single atomic value, there are no repeating groups, and each row is unique. Storing a comma-separated list of values in one cell breaks 1NF.
BeginnerQuick answer1 min read - What is a composite key and when do you need one?
A composite key is a key made of two or more columns that together identify a row. It is needed when no single column is unique, such as a student and subject pair in a marks table.
BeginnerQuick answer1 min read - What is a functional dependency in DBMS?
A functional dependency X -> Y means that if two rows have the same X value they must have the same Y value, so X determines Y. Normalization is built on finding and organizing these dependencies.
BeginnerQuick answer1 min read - What is the difference between a super key, a candidate key and a primary key?
A super key is any set of columns that uniquely identifies a row. A candidate key is a minimal super key with no removable column. The primary key is the one candidate key you choose to identify rows.
BeginnerQuick answer1 min read