Dbms Quiz
Dbms Quiz
1. What is a Database?
o a) A collection of related data
o b) A software system that manages data
o c) A hardware device for storing data
o d) A programming language for data processing
2. What is DBMS?
o a) A tool to manage database access
o b) A software for creating and managing databases
o c) A file management system
o d) A programming language
3. Which of the following is NOT a type of database model?
o a) Hierarchical
o b) Relational
o c) Network
o d) Linear
4. In a relational database, what is a table also known as?
o a) Attribute
o b) Tuple
o c) Relation
o d) Schema
5. What is a primary key?
o a) A unique identifier for each record in a table
o b) A foreign key in another table
o c) A value that repeats for each row
o d) A column with null values
6. Which of the following SQL commands is used to retrieve data from a database?
o a) UPDATE
o b) DELETE
o c) SELECT
o d) INSERT
7. What is normalization in DBMS?
o a) Process of adding redundant data
o b) Structuring data to minimize redundancy
o c) Making the database schema larger
o d) Creating additional indexes
8. Which SQL clause is used to filter records?
o a) SELECT
o b) WHERE
o c) FROM
o d) JOIN
9. What is a foreign key?
o a) A key used to uniquely identify records
o b) A key that refers to the primary key in another table
o c) A key used to index data
o d) A composite key used in table joins
10. What is the purpose of an index in a database?
o a) To speed up data retrieval
o b) To ensure data integrity
o c) To create relationships between tables
o d) To enforce normalization rules
11. Which operation is part of the ACID properties of a transaction?
o a) Authorization
o b) Consistency
o c) Durability
o d) Isolation
12. What does the SQL command DROP do?
o a) Deletes a table and its data
o b) Deletes only data in a table
o c) Removes duplicate rows
o d) Updates a table structure
13. What is a JOIN in SQL?
o a) Combines records from multiple tables
o b) Removes duplicates
o c) Sorts data in ascending order
o d) Deletes matching rows from two tables
14. Which normal form eliminates transitive dependencies?
o a) First Normal Form (1NF)
o b) Second Normal Form (2NF)
o c) Third Normal Form (3NF)
o d) Boyce-Codd Normal Form (BCNF)
15. What is the difference between UNION and UNION ALL in SQL?
o a) UNION removes duplicates; UNION ALL does not
o b) UNION includes NULLs; UNION ALL does not
o c) UNION ALL removes duplicates; UNION does not
o d) There is no difference
16. Which of the following is a NoSQL database?
o a) MySQL
o b) MongoDB
o c) Oracle
o d) PostgreSQL
17. What does GROUP BY do in SQL?
o a) Groups rows that have the same values into summary rows
o b) Sorts data alphabetically
o c) Limits the number of rows returned
o d) Deletes duplicate rows
18. Which SQL keyword is used to sort the result-set?
o a) ORDER BY
o b) GROUP BY
o c) FILTER BY
o d) LIMIT
19. What is a stored procedure?
o a) A predefined SQL query stored for repeated execution
o b) A temporary table used for complex queries
o c) A primary key used in another table
o d) A foreign key index
20. Which of the following is NOT a type of JOIN in SQL?
o a) INNER JOIN
o b) OUTER JOIN
o c) FULL JOIN
o d) PRIMARY JOIN
21. What is a trigger in a database?
o a) A special type of stored procedure that automatically runs when certain events occur
o b) A constraint that ensures data integrity
o c) A key that enforces a relationship between two tables
o d) An index that speeds up queries
22. Which of the following is true for a one-to-many relationship?
o a) One record in Table A is related to many records in Table B
o b) Many records in Table A are related to many records in Table B
o c) One record in Table A is related to only one record in Table B
o d) Many records in Table A are related to one record in Table B
23. Which of the following is a type of constraint in a database?
o a) UNIQUE
o b) DELETE
o c) INSERT
o d) RETURN
24. What is the purpose of a database schema?
o a) It defines the structure of the database
o b) It stores data temporarily
o c) It manages user permissions
o d) It controls access to the database
25. Which SQL function is used to count the number of rows?
o a) COUNT()
o b) SUM()
o c) AVG()
o d) MIN()
26. What does the SQL statement ALTER TABLE do?
o a) Modifies an existing table's structure
o b) Creates a new table
o c) Deletes data from a table
o d) Removes an existing table
27. What is an ER diagram?
o a) A graphical representation of the entities and relationships in a database
o b) A tool for indexing data
o c) A type of primary key
o d) A way to structure SQL queries
28. Which of the following ensures referential integrity?
o a) Foreign Key
o b) Index
o c) Primary Key
o d) View
29. Which of the following commands removes a database table but not its data?
o a) DELETE
o b) TRUNCATE
o c) DROP
o d) None of the above
30. What is data redundancy in a database?
o a) Duplication of data in multiple places
o b) Deleting unnecessary data
o c) Creating backup copies of data
o d) A result of normalization
These questions cover the essential topics in database management systems, including SQL, database
design, and normalization.
You said:
What is ACID?
ChatGPT said:
ACID is a set of properties that ensure reliable processing of database transactions, which are essential
for maintaining the integrity of a database, especially in the case of failures or concurrent access. The
acronym ACID stands for:
1. Atomicity: Ensures that a transaction is treated as a single "all or nothing" unit. If any part of the
transaction fails, the entire transaction fails, and the database remains unchanged.
2. Consistency: Ensures that a transaction brings the database from one valid state to another,
maintaining all predefined rules such as constraints, triggers, and cascades.
3. Isolation: Ensures that transactions are executed independently of one another. The intermediate
states of a transaction are not visible to other transactions until the transaction is completed.
4. Durability: Ensures that once a transaction is committed, the changes are permanent, even in the
case of a system crash or failure.
Together, these properties ensure that database transactions are processed in a reliable and predictable
manner.
You said:
Here’s a 20-item quiz focused on Microsoft Access, a popular relational database management system
(RDBMS):