DBS MCQ (5 files merged) PDF
Document Details
Uploaded by TopQualityTurquoise6500
Tags
Summary
This is a database systems exam - focused on multiple choice questions.
Full Transcript
MCQ DBS Unit I Introduction 1.What is the primary purpose of a database system? A) To provide a user-friendly interface B) To store and manage large amounts of data C) To provide a platform for application development D) To ensure data security and integrity...
MCQ DBS Unit I Introduction 1.What is the primary purpose of a database system? A) To provide a user-friendly interface B) To store and manage large amounts of data C) To provide a platform for application development D) To ensure data security and integrity Answer: B) To store and manage large amounts of data 2. Which of the following is a characteristic of a relational database? A) It uses a hierarchical data structure B) It uses a network data structure C) It uses tables to store data D) It uses a flat file structure Answer: C) It uses tables to store data 3. What is the purpose of a view in a database? A) To provide a physical storage structure for data B) To provide a logical representation of data C) To provide a security mechanism for data access D) To provide a backup mechanism for data recovery Answer: B) To provide a logical representation of data 4. Which of the following is a type of constraint in a database? A) Primary key B) Foreign key C) Check constraint T.Y Page 1 MCQ DBS D) All of the above Answer: D) All of the above 5. What is the purpose of normalization in database design? A) To eliminate data redundancy B) To improve data consistency C) To improve data security D) To improve data scalability Answer: A) To eliminate data redundancy 6. Which of the following is a characteristic of an entity in an ER diagram? A) It has a unique identifier B) It has a set of attributes C) It has a set of relationships with other entities D) All of the above Answer: D) All of the above 7. What is the purpose of a weak entity set in an ER diagram? A) To represent an entity that has a partial key B) To represent an entity that has a total key C) To represent an entity that has a composite key D) To represent an entity that has a foreign key Answer: A) To represent an entity that has a partial key 8. Which of the following is a type of cardinality constraint in an ER diagram? A) One-to-one B) One-to-many C) Many-to-many D) All of the above T.Y Page 2 MCQ DBS Answer: D) All of the above 9. What is the purpose of Codd's rules in database design? A) To provide a set of guidelines for designing relational databases B) To provide a set of rules for normalizing databases C) To provide a set of guidelines for designing ER diagrams D) To provide a set of rules for optimizing database performance Answer: A) To provide a set of guidelines for designing relational databases 10. Which of the following is a type of data modeling technique? A) Entity-relationship modeling B) Object-oriented modeling C) Relational modeling D) All of the above Answer: D) All of the above 11. What is the purpose of a primary key in a relational database? A) To uniquely identify each row in a table B) To provide a foreign key for another table C) To provide a composite key for a table D) To provide a partial key for a table Answer: A) To uniquely identify each row in a table 12. Which of the following is a type of database language? A) Procedural language B) Declarative language C) Object-oriented language D) All of the above T.Y Page 3 MCQ DBS Answer: D) All of the above 13. What is the purpose of a transaction in a database? A) To provide a mechanism for concurrent access to data B) To provide a mechanism for data recovery in case of failure C) To provide a mechanism for data consistency and integrity D) All of the above Answer: D) All of the above 14. Which of the following is a type of database architecture? A) Centralized architecture B) Distributed architecture C) Client-server architecture D) All of the above Answer: D) All of the above 15. What is the purpose of data normalization in database design? A) To eliminate data redundancy B) To improve data consistency C) To improve data security D) To improve data scalability Answer: A) To eliminate data redundancy 16. Which of the following is a type of ER diagram notation? A) Chen's notation B) Crow's foot notation C) Bachman's notation D) All of the above T.Y Page 4 MCQ DBS Answer: D) All of the above 17. What is the purpose of a foreign key in a relational database? A) To provide a primary key for a table B) To provide a foreign key for another table C) To provide a composite key for a table D) To provide a partial key for a table 18. What is the purpose of a view in a database? A) To provide a physical storage structure for data B) To provide a logical representation of data C) To provide a security mechanism for data access D) To provide a backup mechanism for data recovery Answer: B) To provide a logical representation of data 19. Which of the following is a type of database normalization? A) First normal form (1NF) B) Second normal form (2NF) C) Third normal form (3NF) D) All of the above Answer: D) All of the above 20. What is the purpose of a transaction log in a database? A) To provide a mechanism for data recovery in case of failure B) To provide a mechanism for data consistency and integrity C) To provide a mechanism for concurrent access to data D) To provide a mechanism for data backup and archiving T.Y Page 5 MCQ DBS Answer: A) To provide a mechanism for data recovery in case of failure 21. Which of the following is a type of database index? A) B-tree index B) Hash index C) Full-text index D) All of the above Answer: D) All of the above 22. What is the purpose of a database trigger? A) To provide a mechanism for data validation and integrity B) To provide a mechanism for data backup and archiving C) To provide a mechanism for concurrent access to data D) To provide a mechanism for data recovery in case of failure Answer: A) To provide a mechanism for data validation and integrity 23. Which of the following is a type of database join? A) Inner join B) Outer join C) Left join D) All of the above Answer: D) All of the above 24. What is the purpose of a database schema? A) To provide a physical storage structure for data B) To provide a logical representation of data C) To provide a mechanism for data validation and integrity D) To provide a mechanism for data backup and archiving Answer: B) To provide a logical representation of data T.Y Page 6 MCQ DBS 25. Which of the following is a benefit of using a database management system? A) Improved data security and integrity B) Improved data scalability and performance C) Improved data sharing and collaboration D) All of the above Answer: D) All of the above T.Y Page 7 MCQ DBS [Unit 2] Relational Data Model, Relational Algebra and Calculus 1. What is the primary purpose of a database schema? A) To define the physical storage structure of the database B) To define the logical structure of the database C) To define the database's security and access controls D) To define the database's backup and recovery procedures Answer: B) To define the logical structure of the database 2. Which of the following is a type of key in a relational database? A) Primary key B) Foreign key C) Composite key D) All of the above Answer: D) All of the above 3. What is the purpose of the SELECT operation in relational algebra? A) To select specific columns from a relation B) To select specific rows from a relation C) To combine two or more relations D) To delete a relation Answer: B) To select specific rows from a relation 4. Which of the following relational algebra operations is used to combine two or more relations? A) UNION B) INTERSECT C) DIFFERENCE D) CARTESIAN PRODUCT Answer: D) CARTESIAN PRODUCT T.Y Page 1 MCQ DBS 5. What is the purpose of the PROJECT operation in relational algebra? A) To select specific columns from a relation B) To select specific rows from a relation C) To combine two or more relations D) To delete a relation Answer: A) To select specific columns from a relation 6. Which of the following is a type of relational calculus? A) Tuple relational calculus B) Domain relational calculus C) Both A and B D) Neither A nor B Answer: C) Both A and B 7. What is the purpose of the JOIN operation in relational algebra? A) To combine two or more relations based on a common attribute B) To select specific rows from a relation C) To select specific columns from a relation D) To delete a relation Answer: A) To combine two or more relations based on a common attribute 8. Which of the following is a characteristic of a primary key in a relational database? A) It is a unique identifier for each row in the relation B) It is a foreign key that references another relation C) It is a composite key that consists of two or more attributes D) It is a partial key that identifies a subset of rows in the relation Answer: A) It is a unique identifier for each row in the relation T.Y Page 2 MCQ DBS 9. What is the purpose of the DIVISION operation in relational algebra? A) To divide one relation by another relation B) To combine two or more relations C) To select specific rows from a relation D) To delete a relation Answer: A) To divide one relation by another relation 10. Which of the following is a type of relational database constraint? A) Primary key constraint B) Foreign key constraint C) Check constraint D) All of the above Answer: D) All of the above 11. What is the purpose of the RENAME operation in relational algebra? A) To rename a relation B) To rename an attribute C) To combine two or more relations D) To delete a relation Answer: A) To rename a relation 12. Which of the following is a characteristic of a foreign key in a relational database? A) It is a unique identifier for each row in the relation B) It is a primary key that references another relation C) It is a foreign key that references another relation D) It is a partial key that identifies a subset of rows in the relation T.Y Page 3 MCQ DBS Answer: C) It is a foreign key that references another relation 13. What is the purpose of the INTERSECT operation in relational algebra? A) To combine two or more relations B) To select specific rows from a relation C) To select specific columns from a relation D) To delete a relation Answer: A) To combine two or more relations 14. Which of the following is a type of relational calculus query? A) Tuple relational calculus query B) Domain relational calculus query C) Both A and B D) Neither A nor B Answer: C) Both A and B 15. What is the purpose of the UNION operation in relational algebra? A) To combine two or more relations B) To select specific rows from a relation C) To select specific columns from a relation D) To delete a relation Answer: A) To combine two or more relations 16. Which of the following is a characteristic of a relational database? A) It uses a hierarchical data structure B) It uses a network data structure C) It uses a relational data structure D) It uses a flat file structure T.Y Page 4 MCQ DBS Answer: C) It uses a relational data structure 17. What is the purpose of the DIFFERENCE operation in relational algebra? A) To combine two or more relations B) To select specific rows from a relation C) To select specific columns from a relation D) To find the difference between two relations Answer: D) To find the difference between two relations 18. What is the purpose of the AGGREGATE operation in relational algebra? A) To combine two or more relations B) To select specific rows from a relation C) To select specific columns from a relation D) To perform aggregate functions such as SUM, AVG, MAX, MIN Answer: D) To perform aggregate functions such as SUM, AVG, MAX, MIN 19. Which of the following is a type of relational database constraint? A) Primary key constraint B) Foreign key constraint C) Check constraint D) All of the above Answer: D) All of the above 20. What is the purpose of the RENAME operation in relational algebra? A) To rename a relation B) To rename an attribute C) To combine two or more relations D) To delete a relation T.Y Page 5 MCQ DBS Answer: A) To rename a relation 21. Which of the following is a characteristic of a relational database? A) It uses a hierarchical data structure B) It uses a network data structure C) It uses a relational data structure D) It uses a flat file structure Answer: C) It uses a relational data structure 22. What is the purpose of the PROJECTION operation in relational algebra? A) To select specific rows from a relation B) To select specific columns from a relation C) To combine two or more relations D) To delete a relation Answer: B) To select specific columns from a relation 23. Which of the following is a type of relational algebra operation? A) Set operation B) Aggregate operation C) Navigation operation D) All of the above Answer: D) All of the above 24. What is the purpose of the SELECTION operation in relational algebra? A) To select specific rows from a relation B) To select specific columns from a relation C) To combine two or more relations D) To delete a relation T.Y Page 6 MCQ DBS Answer: A) To select specific rows from a relation 25. Which of the following is a characteristic of a relational database schema? A) It defines the physical storage structure of the database B) It defines the logical structure of the database C) It defines the database's security and access controls D) It defines the database's backup and recovery procedures Answer: B) It defines the logical structure of the database T.Y Page 7 MCQ DBS Unit 3 Introduction to SQL 1. What is SQL? A) Structured Query Language B) Standard Query Language C) System Query Language D) Simple Query Language Answer: A) Structured Query Language 2. Which SQL statement is used to create a new table? A) CREATE TABLE B) ALTER TABLE C) DROP TABLE D) TRUNCATE TABLE Answer: A) CREATE TABLE 3. What is the purpose of the SELECT statement in SQL? A) To insert new data into a table B) To update existing data in a table C) To delete data from a table D) To retrieve data from a table Answer: D) To retrieve data from a table 4. Which SQL operator is used to combine two or more conditions? A) AND B) OR C) NOT D) ALL Answer: A) AND T.Y. Page 1 MCQ DBS 5. What is a null value in SQL? A) A value that is unknown or missing B) A value that is zero or empty C) A value that is invalid or incorrect D) A value that is not applicable or relevant Answer: A) A value that is unknown or missing 6. Which SQL function is used to calculate the average value of a column? A) SUM B) AVG C) MAX D) MIN Answer: B) AVG 7. What is a subquery in SQL? A) A query that is nested inside another query B) A query that is executed independently of another query C) A query that is used to update or delete data D) A query that is used to create or modify a table Answer: A) A query that is nested inside another query 8. Which SQL statement is used to modify the structure of an existing table? A) ALTER TABLE B) CREATE TABLE C) DROP TABLE D) TRUNCATE TABLE Answer: A) ALTER TABLE T.Y. Page 2 MCQ DBS 9. What is a view in SQL? A) A virtual table that is based on the result of a query B) A physical table that is stored in the database C) A stored procedure that is used to perform a specific task D) A trigger that is used to enforce data integrity Answer: A) A virtual table that is based on the result of a query 10. Which SQL statement is used to commit a transaction? A) COMMIT B) ROLLBACK C) SAVEPOINT D) RELEASE Answer: A) COMMIT 11. What is a trigger in SQL? A) A stored procedure that is automatically executed when a specific event occurs B) A view that is used to enforce data integrity C) A stored function that is used to perform a specific task D) A constraint that is used to enforce data integrity Answer: A) A stored procedure that is automatically executed when a specific event occurs 12. Which SQL data type is used to store a date and time value? A) DATE B) TIME C) TIMESTAMP D) DATETIME T.Y. Page 3 MCQ DBS Answer: C) TIMESTAMP 13. What is a stored procedure in SQL? A) A precompiled SQL program that is stored in the database B) A view that is used to enforce data integrity C) A trigger that is used to enforce data integrity D) A constraint that is used to enforce data integrity Answer: A) A precompiled SQL program that is stored in the database 14. Which SQL statement is used to grant privileges to a user? A) GRANT B) REVOKE C) CREATE USER D) ALTER USER Answer: A) GRANT 15. What is a cursor in SQL? A) A control structure that is used to iterate over the rows of a query result set B) A stored procedure that is used to perform a specific task C) A trigger that is used to enforce data integrity D) A constraint that is used to enforce data integrity Answer: A) A control structure that is used to iterate over the rows of a query result set 16. Which SQL statement is used to create a new index on a table? A) CREATE INDEX B) ALTER INDEX C) DROP INDEX D) TRUNCATE INDEX T.Y. Page 4 MCQ DBS Answer: A) CREATE INDEX 17. What is a join in SQL? A) A way to combine rows from two or more tables based on a common column B) A way to combine columns from two or more tables based on a common row C) A way to combine rows and columns from two or more tables based on a common column and row D) A way to combine rows and columns from two or more tables based on a common column and row Answer: A) A way to combine rows from two or more tables based on a common column 18. Which SQL statement is used to insert new data into a table? A) INSERT INTO UPDATE C) DELETE D) SELECT Answer: A) INSERT INTO 19. Which SQL statement is used to insert new data into a table? A) INSERT INTO B) UPDATE C) DELETE D) SELECT Answer: A) INSERT INTO 20. What is the purpose of the GROUP BY clause in SQL? A) To group rows of a table based on one or more columns B) To sort rows of a table based on one or more columns C) To filter rows of a table based on one or more conditions T.Y. Page 5 MCQ DBS D) To join two or more tables based on a common column Answer: A) To group rows of a table based on one or more columns 21. Which SQL statement is used to update existing data in a table? A) UPDATE B) INSERT INTO C) DELETE D) SELECT Answer: A) UPDATE 22. What is the purpose of the HAVING clause in SQL? A) To filter groups of rows based on one or more conditions B) To sort groups of rows based on one or more columns C) To join two or more tables based on a common column D) To group rows of a table based on one or more columns Answer: A) To filter groups of rows based on one or more conditions 23. Which SQL statement is used to delete data from a table? A) DELETE B) INSERT INTO C) UPDATE D) SELECT Answer: A) DELETE 24. What is the purpose of the ORDER BY clause in SQL? A) To sort rows of a table based on one or more columns B) To group rows of a table based on one or more columns C) To filter rows of a table based on one or more conditions D) To join two or more tables based on a common column Answer: A) To sort rows of a table based on one or more columns 25. Which SQL statement is used to create a new database? A) CREATE DATABASE B) CREATE TABLE C) CREATE INDEX D) CREATE VIEW Answer: A) CREATE DATABASE T.Y. Page 6 MCQ DBS Unit 4 Relational Database Design and File Organization, Indexing & Hashing. 1. What is the primary goal of normalization in database design? A) To minimize data redundancy B) To maximize data consistency C) To improve data security D) To enhance data scalability Answer: A) To minimize data redundancy 2. Which of the following is a feature of a good relational design? A) Minimizing data redundancy B) Maximizing data consistency C) Improving data security D) All of the above Answer: D) All of the above 3. What is a functional dependency in database design? A) A relationship between two tables B) A relationship between two columns C) A relationship between a determinant and a dependent column D) A relationship between a primary key and a foreign key Answer: C) A relationship between a determinant and a dependent column 4. Which of the following is a normal form in database design? A) First Normal Form (1NF) B) Second Normal Form (2NF) T.Y. Page 1 MCQ DBS C) Third Normal Form (3NF) D) All of the above Answer: D) All of the above 5. What is the purpose of the BCNF normal form in database design? A) To eliminate partial dependencies B) To eliminate transitive dependencies C) To eliminate multi-valued dependencies D) To eliminate all of the above Answer: D) To eliminate all of the above 6. Which of the following is a type of dependency in database design? A) Functional dependency B) Multi-valued dependency C) Join dependency D) All of the above Answer: D) All of the above 7. What is the purpose of the Fourth Normal Form (4NF) in database design? A) To eliminate multi-valued dependencies B) To eliminate join dependencies C) To eliminate functional dependencies D) To eliminate transitive dependencies Answer: A) To eliminate multi-valued dependencies 8. Which of the following is a step in the database design process? A) Requirements gathering B) Conceptual design C) Logical design T.Y. Page 2 MCQ DBS D) All of the above Answer: D) All of the above 9. What is the purpose of file organization in database systems? A) To optimize data retrieval B) To optimize data storage C) To optimize data security D) To optimize data scalability Answer: A) To optimize data retrieval 10. Which of the following is a type of indexing technique in database systems? A) Ordered indexing B) Hash indexing C) B-tree indexing D) All of the above Answer: D) All of the above 11. What is the purpose of a B+ tree index file in database systems? A) To optimize data retrieval B) To optimize data storage C) To optimize data security D) To optimize data scalability Answer: A) To optimize data retrieval 12. Which of the following is a type of hashing technique in database systems? A) Static hashing B) Dynamic hashing C) Linear hashing T.Y. Page 3 MCQ DBS D) All of the above Answer: D) All of the above 13. What is the purpose of the database design process? A) To create a conceptual model of the database B) To create a logical model of the database C) To create a physical model of the database D) All of the above Answer: D) All of the above 14. Which of the following is a benefit of normalization in database design? A) Improved data security B) Improved data scalability C) Reduced data redundancy D) All of the above Answer: D) All of the above 15. What is the purpose of denormalization in database design? A) To improve data security B) To improve data scalability C) To improve query performance D) To reduce data redundancy Answer: C) To improve query performance 16. Which of the following is a type of data dependency in database design? A) Functional dependency B) Multi-valued dependency C) Join dependency D) All of the above T.Y. Page 4 MCQ DBS Answer: D) All of the above 17. What is the purpose of the Third Normal Form (3NF) in database design? A) To eliminate partial dependencies B) To eliminate transitive dependencies C) To eliminate multi-valued dependencies D) To eliminate all of the above Answer: B) To eliminate transitive dependencies 18. Which of the following is a benefit of using a B-tree index file in database systems? A) Improved data security B) Improved data scalability C) Improved query performance D) All of the above Answer: C) Improved query performance 19. What is the purpose of the Fourth Normal Form (4NF) in database design? A) To eliminate multi-valued dependencies B) To eliminate join dependencies C) To eliminate functional dependencies D) To 20. What is the purpose of the Fifth Normal Form (5NF) in database design? A) To eliminate join dependencies B) To eliminate multi-valued dependencies C) To eliminate functional dependencies D) To eliminate transitive dependencies T.Y. Page 5 MCQ DBS Answer: A) To eliminate join dependencies 21. Which of the following is a benefit of using a hash index file in database systems? A) Improved data security B) Improved data scalability C) Improved query performance D) All of the above Answer: C) Improved query performance 22. What is the purpose of the database design process? A) To create a conceptual model of the database B) To create a logical model of the database C) To create a physical model of the database D) All of the above Answer: D) All of the above 23. Which of the following is a type of data dependency in database design? A) Functional dependency B) Multi-valued dependency C) Join dependency D) All of the above Answer: D) All of the above 24. What is the purpose of denormalization in database design? A) To improve data security B) To improve data scalability C) To improve query performance D) To reduce data redundancy T.Y. Page 6 MCQ DBS Answer: C) To improve query performance 25. Which of the following is a benefit of using a B+ tree index file in database systems? A) Improved data security B) Improved data scalability C) Improved query performance D) All of the above Answer: C) Improved query performance T.Y. Page 7 MCQ DBS Unit 5 Transaction Processing Transaction Concept 1. What is a transaction in a database system? A) A single SQL statement B) A sequence of SQL statements C) A database schema D) A database instance Answer: B) A sequence of SQL statements 2. Which of the following is a property of a transaction? A) Atomicity B) Consistency C) Isolation D) All of the above Answer: D) All of the above 3. What is transaction atomicity? A) The property that a transaction is executed as a single unit B) The property that a transaction is executed in isolation C) The property that a transaction is durable D) The property that a transaction is consistent Answer: A) The property that a transaction is executed as a single unit 4. What is transaction isolation? A) The property that a transaction is executed in isolation B) The property that a transaction is executed as a single unit C) The property that a transaction is durable D) The property that a transaction is consistent T.Y. Page 1 MCQ DBS Answer: A) The property that a transaction is executed in isolation 5. What is the ACID property of a transaction? A) Atomicity, Consistency, Isolation, Durability B) Atomicity, Consistency, Integrity, Durability C) Atomicity, Consistency, Isolation, Integrity D) Atomicity, Consistency, Integrity, Scalability Answer: A) Atomicity, Consistency, Isolation, Durability 6. What is serializability in concurrency control? A) The property that a schedule is equivalent to a serial schedule B) The property that a schedule is equivalent to a parallel schedule C) The property that a schedule is equivalent to a concurrent schedule D) The property that a schedule is equivalent to a distributed schedule Answer: A) The property that a schedule is equivalent to a serial schedule 7. What is a lock-based protocol in concurrency control? A) A protocol that uses locks to synchronize access to shared data B) A protocol that uses timestamps to synchronize access to shared data C) A protocol that uses serialization to synchronize access to shared data D) A protocol that uses validation to synchronize access to shared data Answer: A) A protocol that uses locks to synchronize access to shared data 8. What is deadlock handling in concurrency control? A) The process of detecting and resolving deadlocks B) The process of preventing deadlocks C) The process of avoiding deadlocks D) The process of tolerating deadlocks T.Y. Page 2 MCQ DBS Answer: A) The process of detecting and resolving deadlocks 9. What is multiple granularity in concurrency control? A) The ability to lock data at multiple levels of granularity B) The ability to lock data at a single level of granularity C) The ability to lock data at a coarse level of granularity D) The ability to lock data at a fine level of granularity Answer: A) The ability to lock data at multiple levels of granularity 10. What is a timestamp-based protocol in concurrency control? A) A protocol that uses timestamps to synchronize access to shared data B) A protocol that uses locks to synchronize access to shared data C) A protocol that uses serialization to synchronize access to shared data D) A protocol that uses validation to synchronize access to shared data Answer: A) A protocol that uses timestamps to synchronize access to shared data 11. What is a recovery system in database systems? A) A system that restores the database to a consistent state after a failure B) A system that prevents failures from occurring in the database C) A system that detects failures in the database D) A system that tolerates failures in the database Answer: A) A system that restores the database to a consistent state after a failure 12. What is the purpose of a transaction log in a database system? A) To record all changes made to the database B) To record all queries executed on the database C) To record all transactions executed on the database D) To record all errors that occur in the database T.Y. Page 3 MCQ DBS Answer: A) To record all changes made to the database 13. What is a checkpoint in a database system? A) A point in time where the database is in a consistent state B) A point in time where the database is in an inconsistent state C) A point in time where the database is being backed up D) A point in time where the database is being recovered Answer: A) A point in time where the database is in a consistent state 14. What is a redo log in a database system? A) A log that contains all changes made to the database B) A log that contains all queries executed on the database C) A log that contains all transactions executed on the database D) A log that contains all errors that occur in the database Answer: A) 15. What is a undo log in a database system? A) A log that contains all changes made to the database B) A log that contains all queries executed on the database C) A log that contains all transactions executed on the database D) A log that contains all actions that need to be undone Answer: D) A log that contains all actions that need to be undone 16. What is the purpose of a recovery manager in a database system? A) To manage the database's storage B) To manage the database's security C) To manage the database's recovery D) To manage the database's performance T.Y. Page 4 MCQ DBS Answer: C) To manage the database's recovery 17. What is a transaction ID in a database system? A) A unique identifier for a transaction B) A unique identifier for a database C) A unique identifier for a table D) A unique identifier for a row Answer: A) A unique identifier for a transaction 18. What is a concurrency control mechanism in a database system? A) A mechanism that ensures multiple transactions can execute concurrently B) A mechanism that ensures only one transaction can execute at a time C) A mechanism that ensures transactions are executed in a specific order D) A mechanism that ensures transactions are executed in parallel Answer: A) A mechanism that ensures multiple transactions can execute concurrently 19. What is a deadlock in a database system? A) A situation where two or more transactions are blocked, waiting for each other to release resources B) A situation where a transaction is blocked, waiting for another transaction to release resources C) A situation where a transaction is executing slowly D) A situation where a transaction is executing quickly Answer: A) A situation where two or more transactions are blocked, waiting for each other to release resources 20. What is a timestamp in a database system? A) A unique identifier for a transaction B) A unique identifier for a database T.Y. Page 5 MCQ DBS C) A unique identifier for a table D) A value that represents the time at which a transaction was executed Answer: D) A value that represents the time at which a transaction was executed 21. What is a commit in a database system? A) The act of making permanent changes made by a transaction B) The act of undoing changes made by a transaction C) The act of executing a transaction D) The act of rolling back a transaction Answer: A) The act of making permanent changes made by a transaction 22. What is a rollback in a database system? A) The act of making permanent changes made by a transaction B) The act of undoing changes made by a transaction C) The act of executing a transaction D) The act of committing a transaction Answer: B) The act of undoing changes made by a transaction 23. What is a concurrency control protocol in a database system? A) A set of rules that govern how multiple transactions can execute concurrently B) A set of rules that govern how a single transaction can execute C) A set of rules that govern how a database can be recovered D) A set of rules that govern how a database can be backed up Answer: A) A set of rules that govern how multiple transactions can execute concurrently T.Y. Page 6 MCQ DBS 24. What is a transaction log in a database system? A) A record of all changes made by a transaction B) A record of all queries executed on a database C) A record of all transactions executed on a database D) A record of all errors that occur in a database Answer: A) A record of all changes made by a transaction 25. What is a recovery algorithm in a database system? A) A procedure for restoring a database to a consistent state after a failure B) A procedure for backing up a database C) A procedure for optimizing a database D) A procedure for securing a database Answer: A) A procedure for restoring a database to a consistent state after a failure T.Y. Page 7