DBMS questions and answers

Keys, normalisation, transactions and indexing. Practise dbms questions from the technical & programming section of placement tests, with a worked explanation after every answer. Practice is free and needs no sign-up.

Sample dbms questions with worked answers

Question 1

Which normal form requires that every attribute of a relation hold only atomic (indivisible) values?

  1. 2NF
  2. 1NF
  3. 3NF
  4. BCNF

Answer: B. 1NF

Explanation: First Normal Form (1NF) requires atomic values, so there are no repeating groups or multi-valued attributes in a single column.

Question 2

Relation R(A, B, C) has the functional dependencies A → B and B → C, and A is the only candidate key. What is the highest normal form R satisfies?

  1. 1NF
  2. 3NF
  3. 2NF
  4. BCNF

Answer: C. 2NF

Explanation: The key A is a single attribute, so there is no partial dependency and R is in 2NF. But A → B → C is a transitive dependency of the non-prime attribute C on the key, so R is not in 3NF.

Question 3

Relation R(A, B, C, D) has exactly one candidate key, A. How many superkeys does R have?

  1. 4
  2. 16
  3. 15
  4. 8

Answer: D. 8

Explanation: A superkey is any attribute set containing a candidate key. Every set that contains A is a superkey, and the other three attributes can each be in or out, giving 2^3 = 8 superkeys.

All 30 dbms questions with answers

DBMS: common questions

What are dbms questions?

Keys, normalisation, transactions and indexing. They appear in the technical & programming section of many placement tests.

Where can I practise dbms questions with answers for free?

Right here on LogicWiz Exams. Every dbms question has a worked explanation after you answer. Practice is free and needs no sign-up.

How should I practise dbms?

Start with easy questions, then move to medium and hard. Read the explanation after each answer, and come back to the ones you missed.

Start practising

On this page you can start a fresh set of dbms questions, choose easy, medium or hard, and time yourself if you want to. Or practise the whole subject: Technical & Programming practice.

More technical & programming topics

Other subjects

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge · Test from a job description · LogicWiz Open: free team quiz · Free interview prep