IT | Database Management Systems (DBMS & SQL) 9/22

Database Management Systems (DBMS & SQL) – 50 One-Liner Q&A

DBMS Basics

Q.1. What is DBMS?
Ans. A software system to create, store, manage, and retrieve databases efficiently.

Q.2. Example of DBMS?
Ans. Microsoft Access, dBASE.

Q.3. What is RDBMS?
Ans. Relational Database Management System that stores data in tables with relationships.

Q.4. Example of RDBMS?
Ans. Oracle, MySQL, SQL Server, PostgreSQL.

Q.5. Who proposed the relational model of DBMS?
Ans. E. F. Codd in 1970.


Keys in DBMS

Q.6. What is a Primary Key?
Ans. A unique identifier for a record in a table.

Q.7. What is a Foreign Key?
Ans. A key that refers to the primary key in another table.

Q.8. What is a Candidate Key?
Ans. Attributes that can qualify as a primary key.

Q.9. What is a Super Key?
Ans. A set of attributes that uniquely identifies a record.

Q.10. What is a Composite Key?
Ans. A primary key made of two or more columns.


Normalization & Integrity

Q.11. What is normalization?
Ans. Process of organizing data to reduce redundancy and dependency.

Q.12. Who introduced normalization?
Ans. E. F. Codd.

Q.13. What is 1NF (First Normal Form)?
Ans. No repeating groups; atomic values only.

Q.14. What is 2NF (Second Normal Form)?
Ans. 1NF + no partial dependency.

Q.15. What is 3NF (Third Normal Form)?
Ans. 2NF + no transitive dependency.

Q.16. What is BCNF (Boyce-Codd Normal Form)?
Ans. A stronger version of 3NF removing anomalies.

Q.17. What is Referential Integrity?
Ans. Ensures foreign keys match primary keys.

Q.18. What is an Anomaly in DBMS?
Ans. Problem caused by redundancy: Insert, Update, Delete anomalies.

Q.19. What is Denormalization?
Ans. Adding redundancy to improve query performance.

Q.20. What is Indexing in DBMS?
Ans. Technique to speed up data retrieval using index structures.


Transactions & Concurrency

Q.21. What is a Transaction in DBMS?
Ans. A sequence of operations performed as a single logical unit of work.

Q.22. What are ACID properties?
Ans. Atomicity, Consistency, Isolation, Durability.

Q.23. What is Atomicity?
Ans. Transaction is all-or-nothing.

Q.24. What is Consistency?
Ans. Transaction must preserve database integrity.

Q.25. What is Isolation?
Ans. Transactions execute independently of each other.

Q.26. What is Durability?
Ans. Once committed, changes are permanent.

Q.27. What is Deadlock in DBMS?
Ans. A state where two or more transactions wait indefinitely for each other.

Q.28. What is Locking in DBMS?
Ans. Mechanism to prevent simultaneous access to data.

Q.29. What is Two-Phase Commit Protocol?
Ans. A distributed transaction protocol ensuring all-or-nothing execution.

Q.30. What is Concurrency Control?
Ans. Technique to manage simultaneous transactions.


SQL Basics

Q.31. What does SQL stand for?
Ans. Structured Query Language.

Q.32. Who developed SQL?
Ans. IBM in the 1970s (Donald Chamberlin & Raymond Boyce).

Q.33. What are the categories of SQL commands?
Ans. DDL, DML, DCL, TCL, DQL.

Q.34. Example of DDL command?
Ans. CREATE, DROP, ALTER.

Q.35. Example of DML command?
Ans. INSERT, UPDATE, DELETE.

Q.36. Example of DCL command?
Ans. GRANT, REVOKE.

Q.37. Example of TCL command?
Ans. COMMIT, ROLLBACK, SAVEPOINT.

Q.38. Example of DQL command?
Ans. SELECT.

Q.39. Which SQL clause is used for filtering rows?
Ans. WHERE clause.

Q.40. Which SQL clause is used for grouping data?
Ans. GROUP BY.


Advanced SQL

Q.41. What is a Join in SQL?
Ans. A clause used to combine rows from two or more tables.

Q.42. Types of Joins in SQL?
Ans. INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN.

Q.43. What is a View in SQL?
Ans. A virtual table based on the result of a query.

Q.44. What is a Stored Procedure?
Ans. A precompiled collection of SQL statements stored in the database.

Q.45. What is a Trigger in SQL?
Ans. A procedure that executes automatically in response to events.

Q.46. What is a Cursor in SQL?
Ans. A pointer used to fetch rows one by one from a query result.

Q.47. What is a Subquery?
Ans. A query inside another query.

Q.48. What is an Aggregate Function in SQL?
Ans. Function that performs calculations on multiple values (SUM, AVG, COUNT).

Q.49. What is a Scalar Function in SQL?
Ans. Function that returns a single value (LENGTH, UPPER, NOW).

Q.50. Which command is used to remove all rows from a table but keep its structure?
Ans. TRUNCATE.




Post a Comment

0 Comments