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?
- 2NF
- 1NF
- 3NF
- 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?
- 1NF
- 3NF
- 2NF
- 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?
- 4
- 16
- 15
- 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
- Which normal form requires that every attribute of a relation hold only atomic…
- In the ACID properties of a transaction, what does the letter 'I' stand for?
- Among all candidate keys of a relation, the one chosen by the database…
- The SQL commands GRANT and REVOKE belong to which category of SQL statements?
- In an ER diagram (Chen notation), how is a weak entity set drawn?
- Relation R(A, B, C) has the functional dependencies A → B and B → C, and A is…
- Relation R(A, B, C, D, E) has the functional dependencies A → B, B → C and CD…
- Transaction T1 reads a row, then transaction T2 updates that row and commits…
- What does the basic Two-Phase Locking (2PL) protocol guarantee?
- Which rule does Write-Ahead Logging (WAL) enforce?
- In a B+ tree index, where are the pointers to actual data records stored?
- Relation R(A, B, C, D) has exactly one candidate key, A. How many superkeys…
- Relation R(A, B, C) has the single functional dependency B → C. It is…
- Consider the schedule S: r1(X), w2(X), w1(X), where ri and wi are read and…
- Relation R(A, B, C) has the functional dependencies AB → C and C → B. Which is…
- A column in the Enrollment table that refers to the primary key of the Student…
- Which ACID property guarantees that once a transaction has committed, its…
- In a relational database, what is a view?
- In an ER diagram (Chen notation), how is a multivalued attribute such as a…
- Which data model stores data as tables (relations) made of rows and columns?
- Relation R(A, B, C, D, E) has the functional dependencies A → B, BC → D and D…
- A one-to-many relationship 'works in' links Department (one) to Employee…
- Relation R has 3 attributes and 5 tuples, and relation S has 4 attributes and…
- Relation R(A, B, C, D) has the functional dependencies AB → CD and B → C, and…
- A sparse (non-dense) index has an entry for only some of the search-key…
- Changing the internal storage of a database, for example adding an index or…
- Relation R(A, B, C, D) has the functional dependencies A → B, B → C and C → A…
- Relation R(A, B, C, D, E) has exactly two candidate keys, A and B. How many…
- Consider the schedule S: w1(X), r2(X), w2(Y), c2, c1, where ri, wi and ci are…
- Under the wound-wait deadlock-prevention scheme, an older transaction Ti…
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
- Pseudo-code: Trace loops, recursion and bitwise logic.
- C Programming: Output prediction, pointers and operators.
- Java: OOP, strings, collections and exceptions.
- Python: Data types, comprehensions and mutability.
- Data Structures: Arrays, stacks, queues, trees, graphs and hashing.
- Algorithms: Complexity, sorting, searching, recursion and DP.
- Object-Oriented Programming: Encapsulation, inheritance, polymorphism, abstraction.
- SQL: Joins, grouping, subqueries and query output.
- Operating Systems: Processes, scheduling, memory and deadlocks.
- Computer Networks: OSI/TCP-IP, protocols, addressing and ports.
- Software Engineering: SDLC, testing, agile and version control.
- Cloud & DevOps: Service models, containers, CI/CD and Linux.
- GenAI Basics: LLMs, tokens, prompting, embeddings and RAG.
Other subjects
- Quantitative Aptitude: Arithmetic, percentages, time and work, speed, probability and data interpretation: the numerical section of every fresher test.
- Logical Reasoning: Series, coding-decoding, arrangements, syllogisms and puzzles: the section that separates prepared candidates from the rest.
- Verbal Ability: Vocabulary, grammar, reading comprehension and sentence order: tested in nearly every IT services hiring exam.
- Python: Python quizzes by topic, from types and strings to classes and generators: output prediction and interview concepts.
- SQL: SQL quizzes by topic, from SELECT and joins to window functions: query output and concepts for analyst and developer roles.
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