1. What is the primary purpose of a Database Management System (DBMS)?
- a) To store, retrieve and manage data efficiently
- b) To create graphical user interfaces
- c) To develop operating systems
- d) To design computer hardware
Answer: A - A DBMS is software designed to store, retrieve, define, and manage data in a database.
2. Which of the following is NOT a DBMS?
- a) MySQL
- b) Oracle
- c) MongoDB
- d) MS Word
Answer: D - MS Word is a word processor, not a database management system.
3. What is the main advantage of using a DBMS over file systems?
- a) Data independence and reduced redundancy
- b) Faster processing speed
- c) Smaller storage requirements
- d) Easier to learn
Answer: A - DBMS provides data independence and minimizes redundancy through normalization.
4. What does ACID stand for in DBMS?
- a) Atomicity, Consistency, Isolation, Durability
- b) Accuracy, Completeness, Integrity, Durability
- c) Association, Concurrency, Integrity, Data
- d) Atomicity, Concurrency, Isolation, Durability
Answer: A - ACID properties ensure reliable transaction processing in databases.
5. Which SQL command is used to create a new table?
- a) CREATE TABLE
- b) MAKE TABLE
- c) NEW TABLE
- d) DEFINE TABLE
Answer: A - The CREATE TABLE statement is used to create a new table in a database.
6. What is a primary key in a database?
- a) A unique identifier for each record in a table
- b) The first column in every table
- c) A backup of the database
- d) The most important table in the database
Answer: A - A primary key uniquely identifies each record and cannot contain NULL values.
7. What is normalization in DBMS?
- a) The process of organizing data to minimize redundancy
- b) Making all data uppercase
- c) Converting data to normal form
- d) Standardizing database sizes
Answer: A - Normalization is the process of structuring a database to reduce redundancy and improve data integrity.
8. Which of the following is NOT a normal form?
- a) First Normal Form (1NF)
- b) Second Normal Form (2NF)
- c) Third Normal Form (3NF)
- d) Zero Normal Form (0NF)
Answer: D - There is no Zero Normal Form in database normalization.
9. What is a foreign key?
- a) A field that refers to the primary key of another table
- b) A key that is used to encrypt data
- c) The primary key of a table
- d) A key that is not used frequently
Answer: A - A foreign key establishes a relationship between two tables by referencing the primary key of another table.
10. Which SQL command is used to retrieve data from a database?
- a) SELECT
- b) GET
- c) RETRIEVE
- d) FETCH
Answer: A - The SELECT statement is used to query data from a database.
11. What is the purpose of an index in a database?
- a) To speed up data retrieval operations
- b) To store backup data
- c) To encrypt sensitive data
- d) To define table relationships
Answer: A - Indexes improve the speed of data retrieval operations on a database table.
12. Which of the following is NOT a type of database model?
- a) Relational model
- b) Hierarchical model
- c) Network model
- d) Linear model
Answer: D - There is no "Linear model" in database management systems.
13. What is a transaction in DBMS?
- a) A sequence of operations performed as a single logical unit of work
- b) The process of transferring data between databases
- c) A type of database backup
- d) A user login session
Answer: A - A transaction is a unit of work that is performed against a database.
14. Which SQL clause is used to filter records?
- a) WHERE
- b) FILTER
- c) SEARCH
- d) CONDITION
Answer: A - The WHERE clause is used to filter records that meet specified conditions.
15. What is a view in DBMS?
- a) A virtual table based on the result-set of an SQL statement
- b) The graphical interface of a database
- c) A way to visualize database relationships
- d) A stored procedure
Answer: A - A view is a virtual table that contains data from one or more tables.
16. Which of the following is NOT a DML (Data Manipulation Language) command?
- a) SELECT
- b) INSERT
- c) UPDATE
- d) CREATE
Answer: D - CREATE is a DDL (Data Definition Language) command, not DML.
17. What is the purpose of the GROUP BY clause in SQL?
- a) To group rows that have the same values in specified columns
- b) To organize the database into groups
- c) To create groups of tables
- d) To sort the results in groups
Answer: A - GROUP BY groups rows that have the same values into summary rows.
18. What does the HAVING clause do in SQL?
- a) Filters groups after the GROUP BY clause is applied
- b) Specifies which columns to include in the result
- c) Determines the sort order of results
- d) Creates temporary tables
Answer: A - HAVING is like WHERE but operates on grouped records after GROUP BY.
19. What is a stored procedure?
- a) A prepared SQL code that can be saved and reused
- b) A backup of database procedures
- c) A method for storing data
- d) A type of database index
Answer: A - A stored procedure is a prepared SQL code that can be saved and executed repeatedly.
20. What is the purpose of the COMMIT command?
- a) To save all transactions to the database
- b) To delete all transactions
- c) To create a new transaction
- d) To view transaction history
Answer: A - COMMIT permanently saves all changes made in the current transaction.