DBMS Interview Questions & Answers
Top questions asked in interviews for freshers & experienced developers
1. What is DBMS?
DBMS is a software that manages databases and allows users to store,
retrieve, and manipulate data.
2. What is a database?
A database is an organized collection of data stored electronically.
3. What are the advantages of DBMS?
Data security, reduced redundancy, data integrity, and easy access.
4. What is data redundancy?
Unnecessary duplication of data in a database.
5. What is data integrity?
Accuracy and consistency of data in the database.
6. What is a DBMS schema?
Schema defines the structure of the database.
7. What are the types of DBMS?
Hierarchical, Network, Relational, and Object-Oriented DBMS.
8. What is RDBMS?
RDBMS stores data in the form of tables with rows and columns.
9. What is a table?
A table is a collection of related data organized in rows and
columns.
10. What is a tuple?
A tuple represents a single row in a table.
11. What is an attribute?
An attribute represents a column in a table.
12. What is a primary key?
A primary key uniquely identifies each record in a table.
13. What is a foreign key?
A foreign key creates a relationship between two tables.
14. What is a candidate key?
A candidate key is a set of attributes that can uniquely identify a
record.
15. What is a composite key?
A key formed using two or more attributes.
16. What is normalization?
Process of organizing data to reduce redundancy.
17. What are normal forms?
Rules used to structure database tables efficiently.
18. What is 1NF?
First Normal Form removes repeating groups.
19. What is 2NF?
Second Normal Form removes partial dependency.
20. What is 3NF?
Third Normal Form removes transitive dependency.
21. What is denormalization?
Process of adding redundancy to improve performance.
22. What is SQL?
SQL is used to interact with relational databases.
23. What are DDL commands?
CREATE, ALTER, DROP, TRUNCATE.
24. What are DML commands?
INSERT, UPDATE, DELETE.
25. What is DCL?
Data Control Language manages access permissions.
26. What is TCL?
Transaction Control Language manages transactions.
27. What is a transaction?
A sequence of operations performed as a single unit.
28. What are ACID properties?
Atomicity, Consistency, Isolation, Durability.
29. What is atomicity?
Transaction executes completely or not at all.
30. What is consistency?
Database moves from one valid state to another.
31. What is isolation?
Transactions execute independently.
32. What is durability?
Committed transactions persist even after failure.
33. What is a view?
A virtual table based on SQL query results.
34. What is an index?
Index improves data retrieval speed.
35. What are types of indexes?
Clustered and Non-clustered indexes.
36. What is a stored procedure?
A precompiled SQL statement stored in database.
37. What is a trigger?
A trigger executes automatically on certain events.
38. What is a cursor?
Cursor processes query results row by row.
39. What is join?
Join combines rows from multiple tables.
40. Types of joins?
INNER, LEFT, RIGHT, FULL joins.
41. What is INNER JOIN?
Returns matching records from both tables.
42. What is LEFT JOIN?
Returns all records from left table and matching from right.
43. What is RIGHT JOIN?
Returns all records from right table and matching from left.
44. What is FULL JOIN?
Returns records when there is a match in either table.
45. What is a subquery?
A query inside another SQL query.
46. What is aggregate function?
Functions like COUNT, SUM, AVG, MAX, MIN.
47. What is GROUP BY?
Groups rows with same values.
48. What is HAVING?
Filters grouped data.
49. What is WHERE clause?
Filters records based on condition.
50. What is NULL?
NULL represents missing or unknown value.
51. What is ER model?
Entity Relationship model represents database structure.
52. What is an entity?
An object that can be uniquely identified.
53. What is relationship?
Association between entities.
54. What is cardinality?
Defines number of relationships between entities.
55. What is weak entity?
Entity that depends on another entity.
56. What is data independence?
Ability to change schema without affecting application.
57. What is logical data independence?
Changes in logical schema without affecting programs.
58. What is physical data independence?
Changes in physical storage without affecting logical schema.
59. What is concurrency control?
Manages simultaneous access to database.
60. What is database security?
Protecting database from unauthorized access.