dbms mcqs

DBMS MCQs with Answers

October 9th, 2026
7857
15:00 Minutes

Preparing for database jobs or interviews? This Top DBMS MCQs collection is your ultimate resource. It includes frequently asked multiple-choice questions, categorized by topic for comprehensive learning — test your knowledge, identify gaps, and improve fast.

Note: Score 60% or higher to unlock an exclusive offer of up to 50% off on all self-paced SQL courses.

Let's begin!

DBMS Fundamentals

1. What does DBMS stand for?






2. Which of the following is NOT a function of a DBMS?






3. Which data model is widely used in modern relational databases?






4. Which language is primarily used to query relational databases?






5. Which of the following describes a relation in a relational database?






6. What is a primary key?






7. Which constraint ensures a column cannot have NULL values?






8. What is a foreign key used for?






9. Which of the following is an example of DDL (Data Definition Language)?






10. Which SQL statement is used to remove all records from a table but keep the table structure?






ER Modeling & Database Design

11. What does ER in an ER diagram stand for?






12. What symbol usually represents an entity in an ER diagram?






13. What does cardinality describe in database design?






14. Which relationship type indicates many-to-many between two entities?






15. What is denormalization?






16. In normalization, which normal form removes repeating groups?






17. What is an associative (junction) table used for?






18. Which of the following is a modelling tool for databases?






19. What is a surrogate key?






20. What should you do to enforce business rules in the database layer?






Normalization & Schema Design

21. Which normal form eliminates partial dependency (dependency on part of a composite key)?






22. Which normal form requires that non-key attributes are not transitively dependent on the primary key?






23. Which of the following can be a problem if a schema is too highly normalized?






24. Which design approach intentionally duplicates data to speed up queries?






25. Which of the following is TRUE about functional dependency?






26. What is a candidate key?






27. Which of these is a benefit of proper normalization?






28. Which normal form does BCNF (Boyce-Codd Normal Form) strengthen?






29. Which of the following indicates multi-valued dependency?






30. When designing for OLTP systems, which is generally prioritized?






You Can Also Check:

1. What is a RDBMS
2. Data Science Tutorial for Beginners
3. Top 35 Data Science Interview Questions and Answers
4. Machine Learning Quiz
5. MongoDB vs MySQL

SQL & Querying

31. Which clause is used to filter rows returned by a SELECT query?






32. Which SQL clause is used to group rows that have the same values?






33. Which JOIN returns only rows that have matching values in both tables?






34. Which function returns the number of rows in a group?






35. Which statement changes data in an existing row?






36. Which keyword ensures unique rows are returned by SELECT?






37. Which SQL construct filters groups after aggregation?






38. What does the SQL clause ORDER BY do?






39. Which SQL clause limits the number of rows returned?






40. Which command removes a table and its data from the database?






41. Which of these is a set operation combining results of two SELECTs but removes duplicates?






42. What is a correlated subquery?






43. Which SQL construct can be used to create stored logic on the server side?






44. What is an SQL view?






45. Which statement is true about indexes?






Transactions & Concurrency

46. Which property of transactions ensures all changes are saved permanently only if the transaction commits?






47. Which isolation level may allow dirty reads?






48. What is a deadlock?






49. Which SQL command begins a transaction in many DBMSs?






50. What does COMMIT do?






51. What does ROLLBACK do?






52. What is a savepoint?






53. Which scheduling ensures serializability by producing the same result as some serial execution?






54. In MVCC (Multi-Version Concurrency Control), what is stored to provide consistent reads?






55. Which of the following is a common method to resolve deadlocks?






Indexing, Storage & Performance

56. Which index type is typically implemented as a balanced tree?






57. What is a clustered index?






58. What is partitioning used for?






59. Which storage model is typically used by columnar databases to speed analytic queries?






60. What is query optimization primarily concerned with?






61. What is a query execution plan?






62. Which tool would you use to speed up full-text search in many DBMSs?






63. What is the effect of too many indexes on a write-heavy table?






64. What does sharding refer to?






65. Which of these storage engines is commonly used by MySQL for transactional support?






Security, Backup & Recovery

66. Which practice helps protect sensitive data in the database?






67. What is the purpose of database backup?






68. What is point-in-time recovery (PITR)?






69. What is replication in databases used for?






70. Which of the following is a recommended practice for database security?






Modern Databases, NoSQL & Cloud DBMS

71. Which of the following is a NoSQL database?






72. Which NoSQL database type stores data in key-value pairs?






73. Which feature is commonly associated with NoSQL databases?






74. Which database is best suited for highly connected data such as social networks?






75. What does CAP theorem describe?






76. Which cloud provider offers Amazon RDS?






77. What is database replication primarily used for?






78. Which SQL function is used to find the highest value in a column?






79. Which SQL clause is used to remove duplicate rows from results?






80. Which command is used to add a new column to an existing table?






81. Which type of JOIN returns all rows from the left table and matching rows from the right table?






82. Which SQL statement is used to add new records into a table?






83. What is the purpose of a database trigger?






84. Which command displays the structure of a table in many SQL databases?






85. Which SQL function returns the lowest value in a column?






86. Which database language is used for access control?






87. Which SQL keyword is used to sort records in descending order?






88. Which command removes specific rows from a table?






89. Which of the following is a document-oriented database?






90. What is vertical scaling in databases?






91. Which SQL clause is used with aggregate functions to filter grouped data?






92. Which SQL operator is used to search for a pattern?






93. Which backup contains only data changed since the last backup?






94. Which SQL function calculates the average value?






95. Which command gives users access privileges?






96. Which command removes access privileges from a user?






97. Which type of database is optimized for analytical workloads?






98. Which SQL keyword is used to rename a column or table alias?






99. What is database caching used for?






100. Which SQL command is used to permanently save transaction changes?






101. Which database model uses tables with rows and columns?






102. Which SQL function adds numeric values?






103. Which SQL clause is used to sort results alphabetically?






104. Which SQL keyword is used to retrieve data?






105. Which SQL command creates a new database?






106. Which type of key uniquely identifies each row in a table?






107. Which SQL operator checks for NULL values?






108. Which database object stores a predefined SQL query?






109. Which database design technique reduces redundancy?






110. Which SQL command deletes an entire table structure?






111. Which SQL keyword combines conditions?






112. Which command removes all rows but keeps the table?






113. Which database system is open-source?






114. Which SQL clause filters individual rows before grouping?






115. Which SQL function returns the current date?






116. Which SQL statement modifies existing records?






117. Which database operation improves query performance?






118. Which type of database stores data in JSON-like documents?






119. Which SQL command is used to rename a table?






120. Which database concept ensures data remains accurate and consistent?






121. Which ACID property ensures that a transaction is treated as a single indivisible unit?






122. Which ACID property ensures that committed data remains saved even after a system failure?






123. What is a composite key?






124. Which type of index is generally most suitable for exact-match lookups?






125. What is a phantom read in transaction processing?






126. Which transaction isolation level provides the strongest isolation in standard SQL?






127. What is a dirty read?






128. What is the primary purpose of a database checkpoint?






129. Which database recovery technique records changes before they are written to data files?






130. What is the main purpose of a database connection pool?






131. Which type of database is specifically designed to store and query relationships between entities?






132. What is eventual consistency in a distributed database?






133. Which database architecture distributes data across multiple independent nodes?






134. What does horizontal scaling typically involve?






135. Which type of database is optimized for storing data points indexed primarily by time?






136. What is a materialized view?






137. What is the purpose of the EXPLAIN command in many relational databases?






138. Which SQL feature assigns a rank or calculation across a set of related rows without collapsing them into one row?






139. Which SQL function can assign a unique sequential number to rows within a result set?






140. What does a Common Table Expression (CTE) provide in SQL?






141. Which SQL JOIN produces a Cartesian product of two tables?






142. What is a self-join?






143. What is the main purpose of database auditing?






144. Which security technique replaces sensitive data with non-sensitive substitute values?






145. What is a read replica primarily used for?






146. What is database failover?






147. Which type of partitioning divides table rows based on ranges of column values?






148. What is the primary purpose of database schema migration?






149. What does database observability help administrators understand?






150. What is a serverless database designed to provide?






151. What is a vector database primarily designed to store and search?






152. Which technique is commonly used by vector databases to find similar embeddings efficiently?






153. Which distance metric is commonly used to compare vector embeddings?






154. What is pgvector primarily used for?






155. What is Hybrid Search in modern databases?






156. In a Retrieval-Augmented Generation (RAG) system, why is a vector database commonly used?






157. What does JSONB provide in PostgreSQL?






158. Which PostgreSQL index type is commonly used for efficient JSONB queries?






159. What is Change Data Capture (CDC) used for?






160. Which technology is commonly used to stream database changes in real time?






161. What is a distributed SQL database?






162. Which of the following is an example of a distributed SQL database?






163. What is the main goal of distributed SQL databases?






164. What is a quorum commonly used for in distributed databases?






165. What is split-brain in a distributed database system?






166. What does leader election accomplish in distributed systems?






167. What is replication lag?






168. What is read-after-write consistency?






169. What is strong consistency in a distributed database?






170. What is horizontal partitioning also commonly called?






171. What is database connection pooling primarily intended to reduce?






172. What is a database connection leak?






173. Which SQL feature is useful for breaking complex queries into readable logical steps?






174. What is a recursive CTE commonly used for?






175. Which window function is commonly used to rank rows while allowing ties to share a rank?






176. What is the key difference between RANK() and ROW_NUMBER()?






177. Which SQL function is commonly used to replace NULL with another value?






178. What does NULLIF() generally return when its two expressions are equal?






179. Which SQL clause is evaluated conceptually after GROUP BY to filter aggregated groups?






180. What is a covering index?






181. What is a composite index?






182. In a composite B-tree index on (A, B), which query is generally most likely to benefit directly from the index?






183. What does a database query planner do?






184. What is a full table scan?






185. Which operation is generally expensive on a very large table without an appropriate index?






186. What is database query parameterization primarily used to help prevent?






187. Which database security principle gives users only the permissions they need?






188. What is role-based access control (RBAC)?






189. What is database encryption at rest designed to protect?






190. What does TLS provide for database connections?






191. What is a database audit log used for?






192. What is tokenization in database security?






193. What is the main difference between encryption and hashing?






194. Which approach is recommended for storing user passwords?






195. What is a database vulnerability assessment primarily intended to identify?






196. What is a database snapshot?






197. Which backup strategy generally provides the fastest complete restore from a single backup set?






198. What does RPO represent in disaster recovery?






199. What does RTO represent in disaster recovery?






200. Why should database backups be tested regularly?






201. What is an OLTP system primarily optimized for?






202. What is an OLAP system primarily designed for?






203. Which storage layout is commonly preferred by analytical databases for scanning selected columns?






204. What is a data warehouse?






205. What is a data lake primarily designed to store?






206. What is a data lakehouse?






207. Which technology is commonly associated with lakehouse table formats?






208. What is a star schema commonly used for?






209. In a star schema, what does a fact table primarily contain?






210. What does ETL stand for?






211. What is ELT different from ETL primarily because transformation occurs where?






212. What is HTAP designed to support?






213. What is a materialized view commonly used for?






214. What is query result caching intended to improve?






215. Which cache is commonly used as an in-memory data store alongside databases?






216. What is cache invalidation?






217. What is the N+1 query problem?






218. Which approach can help reduce an N+1 query problem?






219. What is database connection multiplexing intended to improve?






220. What is database observability commonly based on?






221. Which metric is particularly useful for identifying slow database queries?






222. What does database throughput measure?






223. What is database connection saturation?






224. What is a slow query log used for?






225. What is database workload profiling?






226. What is schema-on-read commonly associated with?






227. What is schema-on-write?






228. What is an idempotent database operation?






229. Why are idempotent operations useful in distributed applications?






230. What is an upsert?






231. Which SQL feature can enforce that duplicate values are not allowed in a column?






232. What does a CHECK constraint do?






233. What is referential integrity intended to ensure?






234. What is a cascading foreign key action?






235. What is a generated column?






236. What is a database sequence commonly used for?






237. What is database collation primarily concerned with?






238. What is a database deadlock detector responsible for?






239. Which technique can reduce deadlocks by ensuring transactions acquire locks in a consistent order?






240. What is optimistic concurrency control based on?






241. What is pessimistic concurrency control primarily based on?






242. What does MVCC help databases achieve?






243. What is a write conflict in concurrent database operations?






244. What is transaction retry commonly used for in distributed databases?






245. What is a distributed transaction?






246. Which protocol is historically used to coordinate commit decisions across distributed transaction participants?






247. What is the main drawback of Two-Phase Commit?






248. What is database failover testing intended to verify?






249. Which database architecture pattern commonly separates read and write workloads?






250. Which modern database capability is especially useful for AI applications that need semantic retrieval?






About the Author
Piyush Verma | igmGuru
About the Author

Piyush is a data science professional with experience building predictive models for retail and finance clients. He is an expert in statistical analysis, exploratory data analysis, feature engineering, and machine learning using Python and SQL. He applies data science methods to practical business problems and communicates results to stakeholders. He writes articles and blogs when he is completely free.

Drop Us a Query
Fields marked * are mandatory
Recent Post
×

Your Shopping Cart


Your shopping cart is empty.