DBMS Important Questions Unit Wise with Answers
One free practice sheet for the whole DBMS exam: the questions worth practising from every unit, marked by answer length (1M, 4M, 6M), with every long answer one click away in the matching TechVani notes.
This sheet collects expected-style practice questions for a typical BTech Database Management Systems course, organized unit by unit to match our nine-part DBMS notes. The marks tags tell you how long the answer should be: 1M one sentence, 4M four short points, 6M a fuller answer with a diagram or worked example. One-mark answers are given inline; longer answers live in the linked notes so this page stays a clean checklist.
Unit 1: Relational Model and Keys (DBMS Part 1)
- 1M Define a primary key. Answer: a minimal set of attributes whose values uniquely identify each row in a table, and which cannot be NULL.
- 1M What is a foreign key? Answer: an attribute (or set) in one table that references the primary key of another table, enforcing referential integrity.
- 1M State one difference between a candidate key and a primary key. Answer: a table can have many candidate keys; the primary key is the one chosen among them to identify rows.
- 4M Explain super key, candidate key, primary key and alternate key with one example table.
- 4M What is referential integrity? Show with an example what happens on DELETE and UPDATE of a referenced row.
- 6M Design a small two-table schema (Students, Enrollments) and explain every constraint you would declare and why.
- 6M Given a relation and a set of attributes, find all candidate keys using attribute closure. Practice set: 6 solved candidate-key problems.
Full worked answers: Unit 1: Relational Model and Keys notes.
Unit 2: ER Model (DBMS Part 2)
- 1M What is an entity set? Answer: a collection of similar entities that share the same attributes, such as all Students.
- 1M Define cardinality in an ER relationship. Answer: the number of entities of one set that can be associated with an entity of the other set, such as one-to-many.
- 4M Explain weak entity sets with an example, and how they are identified using a partial key plus the owner key.
- 4M Differentiate one-to-one, one-to-many and many-to-many relationships with one real example each.
- 6M Draw an ER diagram for a library (Members, Books, Loans) and map it to tables, marking all cardinalities.
- 6M Explain total vs partial participation with an example, and show how each changes the resulting table design.
Full worked answers: Unit 2: ER Model notes.
Unit 3: SQL: JOINs, GROUP BY, HAVING (DBMS Part 3)
- 1M What does GROUP BY do? Answer: it collects rows that share the same values in the grouped columns into one summary row per group.
- 1M Where vs HAVING in one line. Answer: WHERE filters rows before grouping; HAVING filters groups after aggregation.
- 4M Write and explain a query joining two tables and aggregating with COUNT and GROUP BY, line by line.
- 4M Explain LEFT JOIN vs INNER JOIN with a two-table example where one row has no match.
- 6M Given an Employees and Departments schema, write three queries: join with aggregation, HAVING filter, and a NULL-safe count. Predict each output.
- 6M Solve and explain the classic NULL traps: COUNT(*) vs COUNT(column), and NULL in comparisons.
Full worked answers: Unit 3: SQL: JOINs, GROUP BY, HAVING notes.
Unit 4: Relational Algebra (DBMS Part 4)
- 1M Name the basic relational algebra operators. Answer: selection, projection, union, set difference, Cartesian product and rename.
- 1M What does the selection operator do? Answer: it picks the rows of a relation that satisfy a condition, keeping all columns.
- 4M Explain selection, projection and Cartesian product with a small two-table worked example.
- 4M Show how an INNER JOIN can be written using Cartesian product plus selection, with an example.
- 6M For a given Student-Course-Enrollment schema, write relational algebra expressions for four queries and show the resulting tables.
- 6M Explain set operations (union, intersection, difference) in relational algebra, including the union-compatibility rule.
Full worked answers: Unit 4: Relational Algebra notes.
Unit 5: Normalization (DBMS Part 5)
- 1M What is normalization? Answer: the process of structuring tables to reduce redundancy and avoid update anomalies, using normal forms.
- 1M State the rule for 1NF. Answer: every attribute holds only atomic (indivisible) values, with no repeating groups.
- 4M Explain 1NF, 2NF and 3NF, each with a small table that violates it and the fixed design.
- 4M What is a partial dependency and how does removing it produce 2NF? Show with an example.
- 6M Given a relation and its functional dependencies, normalize it step by step to 3NF, justifying each decomposition.
- 6M Explain BCNF vs 3NF: when does a 3NF relation still violate BCNF? Give a concrete example.
Full worked answers: Unit 5: Normalization notes.
Unit 6: Transactions and ACID (DBMS Part 6)
- 1M What is a transaction? Answer: a logical unit of work, a sequence of operations treated as one indivisible action against the database.
- 1M Expand ACID. Answer: Atomicity, Consistency, Isolation, Durability.
- 4M Explain each ACID property with the bank-transfer example.
- 4M Describe the transaction states (active, partially committed, committed, failed, aborted) with a state diagram.
- 6M Explain COMMIT, ROLLBACK and SAVEPOINT with a worked SQL example, including what happens on failure.
- 6M What problems appear when transactions run without control? Explain dirty read, lost update and unrepeatable read with small timelines.
Full worked answers: Unit 6: Transactions and ACID notes.
Unit 7: Concurrency Control and 2PL (DBMS Part 7)
- 1M What is a serial schedule? Answer: a schedule in which transactions run one after another with no interleaving.
- 1M Define conflict serializability. Answer: a schedule is conflict serializable if its conflicting operations can be reordered into an equivalent serial schedule.
- 4M Test a given schedule for conflict serializability using a precedence graph, step by step.
- 4M Explain shared and exclusive locks and their compatibility table.
- 6M Explain two-phase locking (growing and shrinking phases), show a schedule that follows it, and prove why it guarantees serializability.
- 6M What is a deadlock? Show a two-transaction deadlock timeline and explain detection and recovery.
Full worked answers: Unit 7: Concurrency Control and 2PL notes.
Unit 8: Crash Recovery (DBMS Part 8)
- 1M What is write-ahead logging? Answer: the rule that a log record describing a change must be written to stable storage before the changed data page is written.
- 1M What is a checkpoint? Answer: a marker that periodically forces dirty pages and log to disk so recovery starts from a known recent point.
- 4M Explain the role of the log in recovery: undo and redo, with a short crash timeline.
- 4M Compare immediate vs deferred database modification with an example of each.
- 6M Walk through recovery after a crash: which transactions are undone and which redone, given a sample log with a checkpoint.
- 6M Explain shadow paging as an alternative to log-based recovery, with its advantages and costs.
Full worked answers: Unit 8: Crash Recovery notes.
Unit 9: Indexing and B+ Trees (DBMS Part 9)
- 1M What is an index? Answer: a data structure that speeds up row lookup on the indexed attributes, at the cost of extra storage and slower writes.
- 1M Primary vs secondary index in one line. Answer: a primary index is on the ordered key field of the file; a secondary index is on any other field.
- 4M Explain the structure of a B+ tree (root, internal nodes, linked leaves) and why databases prefer it over a binary search tree.
- 4M Dense vs sparse index: definitions, one diagram each, and when each is possible.
- 6M Insert a given key sequence into an order-3 B+ tree step by step, drawing the tree after each split.
- 6M Explain clustered vs non-clustered indexes and how the choice affects query plans, with a worked SELECT example.
Full worked answers: Unit 9: Indexing and B+ Trees notes.
Keep practising
- DBMS Last-Minute Revision - the quick-read version for the night before.
- DBMS SQL Lab File - 12 tested, copyable SQL practicals.
- SQL Complete Notes - the full SQL reference.
- BTech CSE Exam Notes - every subject, semester-wise.
- Stuck on a question? Ask it free on Ask TechVani.
Comments
Post a Comment