0% found this document useful (0 votes)
24 views

All MCQ- DBMS

The document provides a comprehensive overview of Database Management Systems (DBMS) and the Entity-Relationship (ER) model, including definitions, characteristics, and functions of various components. It covers topics such as data independence, data integrity, and the roles of database users, as well as the representation of entities, attributes, and relationships in ER diagrams. The content is structured in a question-and-answer format, highlighting key concepts and terminology relevant to database systems.

Uploaded by

sd1718804
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

All MCQ- DBMS

The document provides a comprehensive overview of Database Management Systems (DBMS) and the Entity-Relationship (ER) model, including definitions, characteristics, and functions of various components. It covers topics such as data independence, data integrity, and the roles of database users, as well as the representation of entities, attributes, and relationships in ER diagrams. The content is structured in a question-and-answer format, highlighting key concepts and terminology relevant to database systems.

Uploaded by

sd1718804
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

UNIT-I

1. What is a Database Management System (DBMS)?


 A) A software system that manages data
 B) A type of hardware used for storage
 C) A tool for managing network resources
 D) A protocol for internet communication
Answer: A
2. Which of the following is NOT a characteristic of the database approach?
 A) Data abstraction
 B) Data redundancy
 C) Data independence
 D) Data isolation
Answer: B
3. What is the main function of the Database Administrator (DBA)?
 A) Writing application programs
 B) Maintaining database performance, security, and backup
 C) Managing users and passwords
 D) Developing the hardware for database management
Answer: B
4. Which of the following is a disadvantage of using a DBMS?
 A) Data integrity
 B) Data redundancy
 C) High initial cost
 D) Efficient query processing
Answer: C
5. What is the primary goal of data independence in a DBMS?
 A) To store data in different formats
 B) To separate data storage from data usage
 C) To enable faster data retrieval
 D) To allow multiple users to access the same data
Answer: B
6. In a traditional file-oriented system, data redundancy is common because:
 A) Data is stored in different locations multiple times
 B) There are too many tables
 C) It is based on relational algebra
 D) There is no metadata
Answer: A
7. What is an advantage of using a DBMS over traditional file systems?
 A) DBMS is slower than traditional file systems
 B) DBMS allows data to be stored in multiple formats
 C) DBMS provides more security and data integrity
 D) DBMS is less complex than file systems
Answer: C
8. Which of the following is a component of a Database Management System?
 A) File Manager
 B) Query Processor
 C) Compiler
 D) Virtual Memory Manager
Answer: B
9. Which of the following describes a database schema?
 A) A snapshot of the database at a particular moment in time
 B) A collection of related records
 C) The structure and organization of the entire database
 D) The process used to query the database
Answer: C
10. What is the main role of a database user?
 A) Designing the database system
 B) Accessing, updating, and retrieving data from the database
 C) Managing the database architecture
 D) Writing low-level system functions
Answer: B
11. In the DBMS architecture, which layer ensures logical data independence?
 A) Physical layer
 B) External layer
 C) Conceptual layer
 D) Security layer
Answer: C
12. Which type of database user interacts with the database using SQL?
 A) DBA
 B) Application programmer
 C) End user
 D) System analyst
Answer: C
13. What does data redundancy refer to?
 A) Storing duplicate data in multiple locations
 B) Keeping data private
 C) Eliminating unnecessary indexes
 D) Efficient use of memory
Answer: A
14. Which of the following is an example of a disadvantage of the database approach?
 A) Data redundancy
 B) Data sharing
 C) Complex to implement
 D) Data consistency
Answer: C
15. The term data independence refers to:
 A) Changing the structure of the database without affecting application programs
 B) Using different data types within the same table
 C) Storing data in different formats
 D) Implementing network security protocols
Answer: A
16. Which of the following components is responsible for managing the logical schema in a
DBMS?
 A) Query Processor
 B) Data Definition Language (DDL) Compiler
 C) Storage Manager
 D) Transaction Manager
Answer: B
17. What is an instance in a database?
 A) The design of the database
 B) A snapshot of the data in the database at a specific moment
 C) The security layer of the database
 D) The application program interacting with the database
Answer: B
18. What are database languages used for?
 A) Communication between databases
 B) Defining, modifying, and accessing data in the database
 C) Compressing data to save storage
 D) Providing user-level security to data
Answer: B
19. Which of the following is NOT an advantage of using a DBMS?
 A) Data security
 B) Reduced application development time
 C) Increased hardware complexity
 D) Efficient query processing
Answer: C
20. What is the purpose of DBMS architecture?
 A) To define how data is stored physically
 B) To provide a framework for database operations and interactions
 C) To perform system backups
 D) To maintain system logs
Answer: B
21. Which type of database user interacts with the database via an application program?
 A) Casual user
 B) Naive user
 C) DBA
 D) Database Designer
Answer: B
22. The conceptual schema in a DBMS is used to:
 A) Describe how data is physically stored
 B) Represent the overall logical structure of the database
 C) Control user access to data
 D) Perform database backups
Answer: B
23. What is a key difference between the traditional file-oriented system and a DBMS?
 A) DBMS supports data redundancy
 B) Traditional file systems offer better security
 C) DBMS centralizes data management, reducing redundancy and inconsistencies
 D) File systems offer more powerful querying features
Answer: C
24. Which of the following is NOT a component of the DBMS?
 A) Application Program
 B) Query Processor
 C) Data Manager
 D) Transaction Manager
Answer: A
25. In the three-level architecture of a DBMS, what does the internal level deal with?
 A) The user's view of the data
 B) The physical storage of data
 C) The conceptual representation of data
 D) The application's interaction with the database
Answer: B
26. Which of the following is a characteristic of the DBMS approach?
 A) Increased data redundancy
 B) Multiple views of the data
 C) Lack of security features
 D) Data dependency on programs
Answer: B
27. Which DBMS component is responsible for query optimization?
 A) Query Processor
 B) DDL Compiler
 C) Transaction Manager
 D) Metadata Manager
Answer: A
28. What does data integrity ensure in a DBMS?
 A) Redundancy in data storage
 B) Backup and recovery of data
 C) Accuracy and consistency of the data
 D) Prevention of hardware failures
Answer: C
29. Which of the following is a major difference between DBMS and traditional file
systems?
 A) DBMS provides more query tools for advanced data access
 B) Traditional file systems offer better security
 C) DBMS requires less memory
 D) Traditional file systems have more structured data
Answer: A
30. Which of the following is the correct definition of database schema?
 A) The actual content of the database at a specific time
 B) A record in the database
 C) The structure that defines the organization of data
 D) A relationship between data elements
Answer: C
31. Which type of user directly interacts with a DBMS using queries?
 A) Naive user
 B) Application developer
 C) Casual user
 D) System administrator
Answer: C
32. Which database component controls access to data?
 A) Application layer
 B) Metadata
 C) DBMS
 D) Query Processor
Answer: C
33. What is logical data independence?
 A) The ability to change the physical schema without affecting the external schema
 B) The ability to change the conceptual schema without affecting application programs
 C) The ability to write queries without affecting the underlying schema
 D) The ability to store data in multiple formats
Answer: B
34. What is physical data independence?
 A) Modifying the conceptual schema without affecting the internal schema
 B) Modifying the internal schema without affecting the external schema
 C) Modifying the external schema without affecting the conceptual schema
 D) Modifying the application program without affecting the database
Answer: B
35. Which of the following database users typically works with end-users to design and
implement databases?
 A) System Analyst
 B) Database Administrator
 C) Naive User
 D) Application Programmer
Answer: A
36. What is the key function of a DBMS?
 A) To facilitate data retrieval and manipulation
 B) To perform hardware diagnostics
 C) To run operating system commands
 D) To compile code for the application program
Answer: A
37. Which of the following describes data manipulation language (DML)?
 A) A language used to define the database schema
 B) A language used to insert, delete, and update data
 C) A language used for querying non-relational data
 D) A language used for transaction management
Answer: B
38. Which of the following types of users interacts with a database only to query pre-
defined forms and reports?
 A) DBA
 B) End-User
 C) Casual User
 D) Naive User
Answer: D
39. In a file-oriented system, how is data organized?
 A) In relations
 B) In files that are not linked or related
 C) In tables with foreign keys
 D) In normalized form
Answer: B
40. What is the key feature of relational database systems?
 A) Storing unstructured data
 B) Linking data using keys to eliminate redundancy
 C) Reducing the cost of hardware
 D) Performing low-level system operations
Answer: B
41. What is metadata in a database system?
 A) Information about the structure of data
 B) Duplicate data stored in the system
 C) Encrypted data used for security
 D) Backup data stored in the cloud
Answer: A
42. In DBMS, normalization is used for:
 A) Creating multiple indexes for faster retrieval
 B) Eliminating data redundancy
 C) Deleting duplicate records
 D) Writing efficient SQL queries
Answer: B
43. What is the query processor in a DBMS responsible for?
 A) Writing SQL queries
 B) Compiling and interpreting queries
 C) Managing hardware components
 D) Deleting old data
Answer: B
44. Which of the following is a function of the data dictionary?
 A) Storing raw data in the database
 B) Providing information about the structure of the database
 C) Managing database backups
 D) Optimizing data retrieval
Answer: B
45. In the DBMS three-tier architecture, the middle tier is typically responsible for:
 A) Query processing
 B) Data storage
 C) Application logic
 D) Data security
Answer: C
46. What is the purpose of data abstraction in a DBMS?
 A) To hide the complexities of data storage and representation
 B) To increase data redundancy
 C) To create physical backups of the data
 D) To control the speed of data retrieval
Answer: A
47. Which of the following best defines the database approach?
 A) Data is managed by separate applications for each department
 B) Data is centralized and managed by the DBMS
 C) Data is stored in file systems across different computers
 D) Data is organized into distributed file systems
Answer: B
48. What is the purpose of a DDL compiler in a DBMS?
 A) To interpret SQL queries
 B) To compile and store schema definitions
 C) To delete obsolete records
 D) To create reports for users
Answer: B
49. What is the main goal of data abstraction?
 A) To allow users to interact with the database without knowing the physical storage
details
 B) To eliminate redundancy in database systems
 C) To create database backups
 D) To increase query processing speed
Answer: A
50. Which DBMS feature allows multiple users to access and update data simultaneously
without conflicts?
 A) Concurrency Control
 B) Data Independence
 C) Query Optimization
 D) Backup and Recovery
Answer: A

UNIT-II

1. What does the term entity represent in the Entity-Relationship (ER) model?
 A) A specific attribute in the database
 B) A real-world object or concept
 C) A table in a relational database
 D) A set of relationships
Answer: B
2. What is an entity set in an ER model?
 A) A collection of related tables
 B) A collection of similar entities
 C) A relationship between two entities
 D) A set of attributes
Answer: B
3. What is an attribute in an ER model?
 A) A relationship between entities
 B) A property or characteristic of an entity
 C) A unique identifier for a record
 D) A collection of entities
Answer: B
4. Which of the following is an example of a composite attribute?
 A) Name (First Name, Last Name)
 B) Date of Birth
 C) Employee ID
 D) Age
Answer: A
5. What is a key attribute?
 A) An attribute that forms part of a relationship
 B) An attribute that can be derived from other attributes
 C) An attribute that uniquely identifies an entity
 D) An attribute that takes multiple values
Answer: C
6. Which of the following is an example of a simple attribute?
 A) Name (First Name, Last Name)
 B) Phone Number
 C) Address (Street, City, Zip)
 D) Full Name
Answer: B
7. In an ER diagram, how is a weak entity represented?
 A) By a double rectangle
 B) By a diamond
 C) By a dashed line
 D) By a circle
Answer: A
8. What is the role of a relationship in the ER model?
 A) To store data in tables
 B) To define associations between entities
 C) To manage database constraints
 D) To serve as a key
Answer: B
9. Which of the following is an example of a derived attribute?
 A) Age, derived from Date of Birth
 B) First Name
 C) Social Security Number
 D) Phone Number
Answer: A
10. What is a primary key in an ER model?
 A) A key that can be NULL
 B) A unique attribute or set of attributes that uniquely identifies an entity
 C) A key that does not participate in relationships
 D) An attribute that is a foreign key
Answer: B
11. In an ER diagram, how is a relationship represented?
 A) A rectangle
 B) A diamond
 C) An oval
 D) A double rectangle
Answer: B
12. What is the purpose of a foreign key?
 A) To uniquely identify records within a table
 B) To define relationships between two entities
 C) To perform complex queries
 D) To store duplicate values
Answer: B
13. In an ER diagram, how is an attribute typically represented?
 A) By a diamond
 B) By a rectangle
 C) By an oval
 D) By a triangle
Answer: C
14. Which of the following is a multi-valued attribute?
 A) Social Security Number
 B) Phone Number(s)
 C) Age
 D) Date of Birth
Answer: B
15. What is the purpose of ER diagrams in database design?
 A) To perform SQL queries
 B) To visualize entities, attributes, and relationships in the database
 C) To optimize the database for performance
 D) To enforce data integrity
Answer: B
16. Which of the following best describes a weak entity?
 A) An entity that has no attributes
 B) An entity that cannot exist without being related to another entity
 C) An entity that has a unique identifier
 D) An entity that stores derived data
Answer: B
17. What type of key is used to uniquely identify a weak entity?
 A) Foreign key
 B) Partial key (Discriminator)
 C) Primary key
 D) Candidate key
Answer: B
18. Which of the following is a binary relationship?
 A) A relationship involving two entities
 B) A relationship involving one entity
 C) A relationship involving more than two entities
 D) A relationship that is reflexive
Answer: A
19. How is a composite key represented in the ER model?
 A) By a single attribute that is unique
 B) By a combination of two or more attributes that uniquely identify an entity
 C) By a foreign key in a relationship
 D) By a derived attribute
Answer: B
20. What is a role in a relationship in an ER diagram?
 A) The part played by an entity in a relationship
 B) A collection of attributes
 C) The constraints applied to the relationship
 D) A composite key used to join tables
Answer: A
21. Which of the following is a ternary relationship?
 A) A relationship involving one entity
 B) A relationship involving three entities
 C) A relationship involving two entities
 D) A self-referencing relationship
Answer: B
22. What is the degree of a relationship in an ER diagram?
 A) The number of attributes involved in the relationship
 B) The number of participating entities in the relationship
 C) The number of unique keys in the relationship
 D) The number of tuples in the relationship
Answer: B
23. Which of the following is an example of a one-to-one relationship?
 A) An employee belongs to one department, and one department has many employees
 B) A person has one passport, and one passport belongs to one person
 C) A student has multiple subjects, and a subject has multiple students
 D) A company has multiple branches, and a branch has multiple employees
Answer: B
24. Which of the following is a many-to-many relationship?
 A) A student enrolls in multiple courses, and a course has multiple students
 B) An employee manages one department
 C) A project is assigned to one employee
 D) A company has only one manager
Answer: A
25. What is a cardinality constraint in an ER diagram?
 A) A constraint that defines the number of entities that participate in a relationship
 B) A rule that limits the number of relationships
 C) A type of key constraint
 D) A technique for optimizing performance
Answer: A
26. Which of the following is a key constraint in an ER model?
 A) Ensuring that each entity has a unique identifier
 B) Defining the number of entities involved in a relationship
 C) Specifying the types of data in each attribute
 D) Creating indexes for faster search
Answer: A
27. In an ER diagram, how is a multi-valued attribute represented?
 A) A dashed oval
 B) A double oval
 C) A rectangle
 D) A triangle
Answer: B
28. What is a composite key?
 A) A single unique attribute
 B) A combination of two or more attributes that uniquely identify an entity
 C) An attribute that can be NULL
 D) An attribute used to join tables
Answer: B
29. What is the difference between a strong entity and a weak entity?
 A) A strong entity has a primary key, while a weak entity does not
 B) A strong entity can exist independently, while a weak entity depends on another entity
 C) A strong entity participates in relationships, while a weak entity does not
 D) A strong entity has composite attributes, while a weak entity does not
Answer: B
30. In an ER diagram, how are relationships between weak entities and strong
entities represented?
 A) By a single rectangle
 B) By a dashed diamond
 C) By a double diamond
 D) By an oval
Answer: C
31. In database design, what is the main purpose of using normalization?
 A) To eliminate data redundancy and improve data integrity
 B) To increase the speed of queries
 C) To create indexes for faster retrieval
 D) To perform complex joins
Answer: A
32. What is a one-to-many relationship?
 A) One entity in set A is associated with only one entity in set B
 B) One entity in set A is associated with multiple entities in set B
 C) Multiple entities in set A are associated with multiple entities in set B
 D) One entity in set B is associated with one entity in set A
Answer: B
33. Which of the following is an ER diagram naming convention?
 A) Using capital letters for attribute names
 B) Naming attributes based on their data types
 C) Using meaningful names that reflect real-world concepts
 D) Using symbols instead of text to name entities
Answer: C
34. What is a partial participation constraint?
 A) Some instances of an entity are involved in the relationship
 B) All instances of an entity are involved in the relationship
 C) The relationship involves multiple entities
 D) The relationship is between two attributes
Answer: A
35. Which of the following is an example of total participation in a relationship?
 A) Every employee in a company must work in at least one department
 B) Every student must take one course
 C) Some customers in a company have multiple accounts
 D) A department must have at least one manager
Answer: A
36. Which of the following is NOT an issue in ER diagram design?
 A) Identifying entities and relationships
 B) Choosing appropriate names for attributes and entities
 C) Determining cardinality constraints
 D) Implementing SQL queries
Answer: D
37. What is a recursive relationship in an ER model?
 A) A relationship where an entity is related to itself
 B) A relationship that occurs multiple times
 C) A relationship involving more than two entities
 D) A relationship between two weak entities
Answer: A
38. What is the purpose of a structural constraint in an ER model?
 A) To specify the number of entities participating in a relationship
 B) To control the data types of attributes
 C) To manage relationships between weak entities
 D) To define key constraints
Answer: A
39. Which of the following is a design issue in an ER model?
 A) Choosing between weak and strong entities
 B) Designing the physical storage of data
 C) Implementing indexes for faster searches
 D) Creating backup systems for the database
Answer: A
40. In the ER model, what is a specialization?
 A) A top-down approach where an entity is divided into sub-entities
 B) A relationship between a strong and weak entity
 C) A composite key for a weak entity
 D) A constraint that ensures data integrity
Answer: A
41. What is the main purpose of generalization in the ER model?
 A) To consolidate sub-entities into a higher-level entity
 B) To divide an entity into specialized sub-entities
 C) To ensure data integrity
 D) To define relationships between attributes
Answer: A
42. What is a superkey in an ER model?
 A) A single attribute that uniquely identifies each entity
 B) A set of attributes that can uniquely identify each entity
 C) An attribute that can have multiple values
 D) A key that has a foreign key reference
Answer: B
43. What does entity integrity ensure in an ER model?
 A) That each entity has a unique primary key
 B) That all foreign keys reference valid primary keys
 C) That attributes are normalized
 D) That data is not redundant
Answer: A
44. What is a disjoint constraint in an ER model?
 A) An entity can only participate in one subclass of a generalization
 B) An entity can participate in multiple subclasses of a generalization
 C) An entity cannot participate in a relationship
 D) An entity can have multiple primary keys
Answer: A
45. In the ER model, what is the purpose of aggregation?
 A) To represent a relationship involving multiple entities and relationships
 B) To create indexes for faster retrieval
 C) To join multiple entities into one
 D) To define multi-valued attributes
Answer: A
46. What is the primary difference between a weak entity and a strong entity?
 A) Weak entities depend on a strong entity for identification
 B) Strong entities have no attributes
 C) Weak entities have primary keys, while strong entities do not
 D) Strong entities participate in relationships, while weak entities do not
Answer: A
47. What is a relationship type in the ER model?
 A) A classification of relationships based on the number of participating entities
 B) A key constraint that defines relationships
 C) A relationship between composite attributes
 D) A set of attributes used in joins
Answer: A
48. What is a candidate key?
 A) A key that can serve as a primary key but is not chosen as the primary key
 B) A key that is used to join tables
 C) A key that is derived from other attributes
 D) A key that is only used for relationships
Answer: A
49. What is a total participation constraint in an ER diagram?
 A) Every instance of an entity must participate in at least one relationship
 B) Some instances of an entity participate in a relationship
 C) A relationship between two weak entities
 D) A constraint applied only to foreign keys
Answer: A
50. In an ER model, what is generalization?
 A) A bottom-up approach where multiple entities are combined into a higher-level entity
 B) A top-down approach where an entity is divided into sub-entities
 C) A method for enforcing key constraints
 D) A rule for ensuring data security
Answer: A

Unit-III

1. What is the primary purpose of the relational model in databases?


 A) To store data in a flat file system
 B) To organize data into tables and define relationships between them
 C) To perform advanced calculations on data
 D) To store unstructured data
Answer: B
2. What is a relation in the relational model?
 A) A mathematical function
 B) A table with rows and columns
 C) A group of related files
 D) A set of relational constraints
Answer: B
3. Which of the following best describes a tuple in a relational database?
 A) A column in a table
 B) A row in a table
 C) A relationship between two tables
 D) A foreign key
Answer: B
4. In the relational model, what is an attribute?
 A) A record in a table
 B) A unique identifier for a relation
 C) A column that represents a characteristic of an entity
 D) A relationship between entities
Answer: C
5. Which of the following is a relational database schema?
 A) A query for retrieving data
 B) The overall structure that defines the organization of tables and relationships
 C) A method for creating views
 D) A procedure for data encryption
Answer: B
6. What is a domain constraint in the relational model?
 A) A constraint that defines a relationship between two tables
 B) A rule that specifies the permissible values for an attribute
 C) A key constraint applied to foreign keys
 D) A constraint that limits the number of tuples
Answer: B
7. What is a primary key constraint?
 A) A constraint that ensures a column can store NULL values
 B) A constraint that ensures a column or combination of columns uniquely identifies each
row
 C) A rule for maintaining relationships between tables
 D) A constraint that prevents duplicate values in multiple columns
Answer: B
8. What is the purpose of a foreign key in a relational database?
 A) To store derived attributes
 B) To establish a link between two tables
 C) To uniquely identify records in a single table
 D) To enforce constraints on data entry
Answer: B
9. Which of the following is a referential integrity constraint?
 A) Ensuring that no foreign key value refers to a non-existent primary key
 B) Ensuring that each tuple has a unique value for the foreign key
 C) Enforcing a limit on the number of foreign keys in a relation
 D) Restricting the use of NULL values in primary keys
Answer: A
10. In relational algebra, what does the projection operator do?
 A) It selects certain columns from a relation
 B) It selects rows from a relation
 C) It combines two relations
 D) It creates a copy of the relation
Answer: A
11. In relational algebra, what does the selection operator do?
 A) It filters rows that satisfy a certain condition
 B) It selects columns from multiple tables
 C) It combines two tables into one
 D) It updates the values in a relation
Answer: A
12. Which of the following is an example of a join operation in relational
algebra?
 A) σA>10(R)
 B) R⋈SR
 C) πA,B(R)
 D) ρ(R,S)
Answer: B
13. What is the purpose of the natural join operation in relational algebra?
 A) To merge two relations based on all attributes with the same name
 B) To select all tuples from both relations
 C) To select tuples that meet a specific condition
 D) To sort tuples in a relation
Answer: A
14. What does the division operator do in relational algebra?
 A) It divides a relation into smaller relations
 B) It returns rows from one relation that match every row in another relation
 C) It combines two relations based on a common attribute
 D) It groups rows together based on certain attributes
Answer: B
15. In relational algebra, what does the rename operator do?
 A) It renames attributes or relations in the query result
 B) It renames all the tuples in the relation
 C) It renames the keys used in a join
 D) It renames the schema of the database
Answer: A
16. What is the difference between a cross join and a natural join?
 A) Cross join returns all combinations of tuples, while natural join matches tuples based
on common attributes
 B) Cross join matches tuples with the same key, while natural join uses all attributes
 C) Natural join is more efficient than cross join
 D) Cross join always returns fewer tuples than natural join
Answer: A
17. Which of the following is an example of a selection operation?
 A) πName(Employee)
 B) σSalary>5000
 C) Employee⋈Department
 D) δ(Salary)(Employee)
Answer: B
18. Which relational algebra operator returns all the tuples from the first
relation that is not present in the second relation?
 A) Union
 B) Intersection
 C) Difference
 D) Selection
Answer: C
19. What is a union operation in relational algebra?
 A) It returns tuples that are present in both relations
 B) It returns all tuples from both relations, removing duplicates
 C) It returns tuples from one relation that are not present in another
 D) It groups attributes into a new relation
Answer: B
20. In relational algebra, which operator is used to combine tuples from two
relations?
 A) Selection
 B) Projection
 C) Join
 D) Union
Answer: C
21. Which of the following relational algebra operations is commutative?
 A) Projection
 B) Selection
 C) Union
 D) Join
Answer: C
22. In relational algebra, what is a theta join?
 A) A join that uses a specific condition (predicate) to combine tuples from two relations
 B) A join that matches tuples based on all attributes
 C) A join that combines all tuples from two relations without any conditions
 D) A join that combines tuples based on key constraints
Answer: A
23. What does the aggregate operation in relational algebra do?
 A) It combines tuples from different relations
 B) It calculates values such as SUM, COUNT, AVG on tuples in a relation
 C) It removes duplicate tuples from a relation
 D) It updates the values in a relation
Answer: B
24. Which of the following is an example of a relational constraint?
 A) Ensuring each primary key is unique
 B) Filtering rows using a WHERE clause
 C) Using GROUP BY to organize data
 D) Sorting tuples by attribute values
Answer: A
25. In a relational database, what is the update anomaly?
 A) A problem that occurs when a tuple is updated in multiple tables
 B) A problem that occurs when updating a relation violates referential integrity
 C) A situation where updates result in inconsistency due to data redundancy
 D) A violation of primary key constraints during an update
Answer: C
26. What is the purpose of the CHECK constraint in SQL?
 A) To enforce a condition that each tuple must satisfy
 B) To limit the number of foreign keys in a relation
 C) To enforce referential integrity between two relations
 D) To create a unique index for fast retrieval
Answer: A
27. Which of the following operators can be used to enforce a relational
constraint in SQL?
 A) SELECT
 B) JOIN
 C) FOREIGN KEY
 D) GROUP BY
Answer: C
28. In relational algebra, what is a self-join?
 A) Joining a relation with itself
 B) Joining two relations based on a common attribute
 C) Joining all relations in the schema
 D) Combining all rows from multiple relations
Answer: A
29. Which of the following is an example of a binary relational operator?
 A) Projection
 B) Selection
 C) Union
 D) Join
Answer: D
30. In the relational model, what is a tuple?
 A) A row in a relation
 B) A column in a relation
 C) A relationship between two relations
 D) A constraint on the relation
Answer: A
31. Which of the following is an example of an update operation in SQL?
 A) UPDATE Employee SET Salary = 5000 WHERE ID = 101;
 B) SELECT * FROM Employee;
 C) DELETE FROM Employee WHERE ID = 101;
 D) INSERT INTO Employee (ID, Name, Salary) VALUES (101, 'Alice', 5000);
Answer: A
32. Which of the following is an example of dealing with constraint violations?
 A) Rejecting an insertion that violates a primary key constraint
 B) Executing a SELECT query on multiple tables
 C) Performing a cross join on two relations
 D) Renaming the attributes in a relation
Answer: A
33. In SQL, which operator is used to enforce a referential integrity constraint?
 A) PRIMARY KEY
 B) FOREIGN KEY
 C) UNIQUE
 D) CHECK
Answer: B
34. Which relational algebra operation is equivalent to the GROUP BY clause in
SQL?
 A) Aggregate operation
 B) Projection
 C) Union
 D) Selection
Answer: A
35. Which of the following is an example of a natural join in SQL?
 A) SELECT * FROM Employee NATURAL JOIN Department;
 B) SELECT * FROM Employee JOIN Department ON Employee.DeptID =
Department.ID;
 C) SELECT * FROM Employee CROSS JOIN Department;
 D) SELECT * FROM Employee LEFT JOIN Department;
Answer: A
36. Which of the following is an example of a join condition in SQL?
 A) SELECT * FROM Employee JOIN Department ON Employee.DeptID =
Department.ID;
 B) SELECT * FROM Employee WHERE Salary > 5000;
 C) SELECT Name FROM Employee GROUP BY DeptID;
 D) SELECT DISTINCT Name FROM Employee;
Answer: A
37. What is the result of a cross join operation in relational algebra?
 A) A combination of all tuples from both relations
 B) The union of all tuples from both relations
 C) The intersection of tuples from both relations
 D) The difference of tuples from both relations
Answer: A
38. Which of the following relational algebra operators eliminates duplicate
tuples from the result?
 A) Projection
 B) Selection
 C) Union
 D) Difference
Answer: A
39. In relational algebra, which operator is used to filter rows based on a
condition?
 A) Projection
 B) Selection
 C) Union
 D) Join
Answer: B
40. In relational algebra, which operator is used to retrieve specific columns?
 A) Selection
 B) Projection
 C) Join
 D) Division
Answer: B
41. Which of the following SQL clauses enforces data constraints during
updates?
 A) CHECK
 B) SELECT
 C) GROUP BY
 D) JOIN
Answer: A
42. What is the purpose of the HAVING clause in SQL?
 A) To filter rows after an aggregation operation
 B) To create constraints between two tables
 C) To perform a join between relations
 D) To group tuples based on a condition
Answer: A
43. In relational algebra, which operator is used to retrieve common tuples from
two relations?
 A) Union
 B) Intersection
 C) Difference
 D) Cross Join
Answer: B
44. What is the difference between UNION and INTERSECTION in relational
algebra?
 A) UNION combines all tuples, while INTERSECTION returns only common tuples
 B) UNION returns the difference between two relations, while INTERSECTION returns
all tuples
 C) UNION is faster than INTERSECTION
 D) INTERSECTION can only be used on relations with primary keys
Answer: A
45. What is a relational algebra expression?
 A) A sequence of relational operators applied to relations
 B) A query written in SQL
 C) A mathematical function used in databases
 D) A condition applied to foreign keys
Answer: A
46. Which of the following is an aggregate function in SQL?
 A) COUNT
 B) SELECT
 C) UPDATE
 D) JOIN
Answer: A
47. What is the purpose of a relational algebra query?
 A) To retrieve data by applying relational operations on tables
 B) To update records in the database
 C) To enforce constraints on data integrity
 D) To perform backup operations on data
Answer: A
48. What is the result of a left outer join in SQL?
 A) It returns all tuples from the left relation and matching tuples from the right relation
 B) It returns all tuples from both relations
 C) It returns only common tuples from both relations
 D) It returns unmatched tuples from the right relation
Answer: A
49. What is a relational schema?
 A) The structure that defines the relations, attributes, and constraints in a database
 B) A query language used for accessing the database
 C) A sequence of relational algebra operations
 D) A set of foreign keys in a relation
Answer: A
50. Which relational algebra operation is used to find tuples in one relation that
do not match any tuple in another relation?
 A) Difference
 B) Union
 C) Intersection
 D) Division
Answer: A
Unit-IV

1. What is SQL primarily used for?


 A) Data storage
 B) Querying, manipulating, and managing data in relational databases
 C) Web development
 D) File management
Answer: B
2. Which of the following SQL statements is used to define a new table?
 A) INSERT
 B) CREATE
 C) DELETE
 D) SELECT
Answer: B
3. Which of the following SQL constraints ensures that no two rows in a table
have the same value in a specified column?
 A) CHECK
 B) FOREIGN KEY
 C) UNIQUE
 D) NOT NULL
Answer: C
4. What does the UPDATE command do in SQL?
 A) Adds a new row to the table
 B) Removes a row from the table
 C) Modifies existing data in the table
 D) Creates a new table
Answer: C
5. Which SQL statement is used to delete records from a table?
 A) REMOVE
 B) DROP
 C) DELETE
 D) TRUNCATE
Answer: C
6. What is the purpose of the WHERE clause in an SQL query?
 A) To filter rows based on a condition
 B) To group data
 C) To update data
 D) To create an index
Answer: A
7. Which SQL function is used to calculate the total number of rows in a table?
 A) SUM()
 B) COUNT()
 C) AVG()
 D) MAX()
Answer: B
8. What is a subquery in SQL?
 A) A query that is written inside another query
 B) A query that returns multiple tables
 C) A query that retrieves specific columns
 D) A query that deletes records
Answer: A
9. What is the difference between TRUNCATE and DELETE in SQL?
 A) DELETE removes all rows; TRUNCATE removes rows one by one
 B) TRUNCATE removes rows without logging, while DELETE logs each row deletion
 C) DELETE is faster than TRUNCATE
 D) Both are used to drop columns
Answer: B
10. In SQL, which operator is used to combine the result sets of two queries while
eliminating duplicates?
 A) UNION
 B) JOIN
 C) INTERSECT
 D) MINUS
Answer: A
11. What does the HAVING clause do in SQL?
 A) Filters rows after the aggregation process
 B) Filters rows before grouping
 C) Defines the primary key of a table
 D) Specifies the ordering of rows
Answer: A
12. Which SQL command is used to create a view?
 A) CREATE VIEW
 B) DEFINE VIEW
 C) MAKE VIEW
 D) SELECT VIEW
Answer: A
13. What is a view in SQL?
 A) A virtual table based on the result of an SQL query
 B) A physical table storing data
 C) A query optimizer
 D) A temporary table created in memory
Answer: A
14. What is the purpose of INNER JOIN in SQL?
 A) To return all rows from both tables
 B) To return only matching rows between two tables
 C) To remove duplicates from two tables
 D) To return unmatched rows from both tables
Answer: B
15. Which of the following SQL operators retrieves rows from one table that do
not exist in another table?
 A) INTERSECT
 B) UNION
 C) MINUS
 D) JOIN
Answer: C
16. Which SQL keyword is used to create a conditional selection of rows in a
query?
 A) WHERE
 B) GROUP BY
 C) ORDER BY
 D) INDEX
Answer: A
17. What is the purpose of the GROUP BY clause in SQL?
 A) To combine rows that have the same values in specified columns
 B) To sort rows in descending order
 C) To delete records based on a condition
 D) To create an index for faster access
Answer: A
18. What does the UNION operator do in SQL?
 A) Combines the result sets of two queries, including duplicate rows
 B) Combines the result sets of two queries, eliminating duplicate rows
 C) Returns rows that exist in both queries
 D) Returns rows that exist in only one of the queries
Answer: B
19. Which SQL clause is used to specify the order in which results are returned?
 A) GROUP BY
 B) ORDER BY
 C) HAVING
 D) LIMIT
Answer: B
20. What is the result of the following SQL query?
sql
Copy code
SELECT COUNT(*)
FROM Employees
WHERE Department = 'Sales';
 A) The total number of employees in the Sales department
 B) The total number of employees in all departments
 C) A list of employee names in the Sales department
 D) The total number of departments
Answer: A
21. In SQL, which aggregate function is used to find the largest value in a
column?
 A) SUM()
 B) MAX()
 C) MIN()
 D) AVG()
Answer: B
22. What does the DISTINCT keyword do in SQL?
 A) It selects only unique values from a column
 B) It filters rows based on a condition
 C) It updates a column with new values
 D) It deletes duplicate rows from a table
Answer: A
23. Which SQL command is used to add a new column to an existing table?
 A) INSERT
 B) ALTER
 C) UPDATE
 D) MODIFY
Answer: B
24. What is the purpose of the JOIN clause in SQL?
 A) To combine data from two or more tables based on a related column
 B) To delete records from multiple tables
 C) To perform an aggregation of data
 D) To define the foreign key in a table
Answer: A
25. Which SQL statement is used to retrieve data from a database?
 A) GET
 B) FETCH
 C) RETRIEVE
 D) SELECT
Answer: D
26. What is the main purpose of data normalization?
 A) To reduce data redundancy and improve data integrity
 B) To improve data retrieval speed
 C) To enforce security policies
 D) To simplify database administration
Answer: A
27. What is a functional dependency in a relational database?
 A) A relationship where one attribute uniquely determines another attribute
 B) A condition that checks for duplicates
 C) A method for encrypting sensitive data
 D) A query optimization technique
Answer: A
28. Which of the following is an example of a functional dependency?
 A) If EmpID uniquely identifies EmployeeName, then EmpID → EmployeeName
 B) If Age identifies EmployeeName, then Age → EmployeeName
 C) If Department determines Salary, then Department → Salary
 D) If EmployeeName is always unique, then EmployeeName → EmpID
Answer: A
29. What does Armstrong's Axioms refer to in functional dependencies?
 A) A set of inference rules used to derive functional dependencies
 B) A method for calculating query costs
 C) A way to normalize databases to BCNF
 D) A technique for indexing data efficiently
Answer: A
30. In the context of functional dependencies, what is the closure of an attribute?
 A) The set of all attributes that can be functionally determined by a given attribute set
 B) A condition that checks for null values
 C) A method for improving query performance
 D) A method for deleting records from a table
Answer: A
31. What is Boyce-Codd Normal Form (BCNF)?
 A) A type of normalization that eliminates all transitive dependencies
 B) A stronger version of the third normal form (3NF)
 C) A rule for ensuring referential integrity
 D) A method for joining tables
Answer: B
32. Which of the following is NOT a requirement for a relation to be in BCNF?
 A) It must be in 3NF
 B) Each non-trivial functional dependency must have a superkey on the left-hand side
 C) It must have no partial dependencies
 D) It must have no duplicate rows
Answer: D
33. What is the goal of normalization in database design?
 A) To eliminate data redundancy and update anomalies
 B) To improve the speed of data retrieval
 C) To ensure data security
 D) To automate query optimization
Answer: A
34. What is a partial dependency?
 A) When a non-key attribute is functionally dependent on part of a composite primary
key
 B) When one attribute depends on another, and both are non-key attributes
 C) When a primary key depends on a foreign key
 D) When two attributes are independent of each other
Answer: A
35. In a table that is in Second Normal Form (2NF), which of the following is
true?
 A) There are no transitive dependencies
 B) All attributes are functionally dependent on the entire primary key
 C) All attributes are functionally dependent on part of the primary key
 D) There are no partial dependencies
Answer: B
36. Which normal form eliminates transitive dependencies?
 A) First Normal Form (1NF)
 B) Second Normal Form (2NF)
 C) Third Normal Form (3NF)
 D) Boyce-Codd Normal Form (BCNF)
Answer: C
37. What is a transitive dependency?
 A) When one non-key attribute depends on another non-key attribute
 B) When a key attribute is dependent on a foreign key
 C) When a primary key is dependent on a non-key attribute
 D) When a composite key depends on a partial key
Answer: A
38. What is the main requirement for a table to be in Third Normal Form (3NF)?
 A) The table must not have any partial dependencies
 B) The table must not have any transitive dependencies
 C) The table must have a composite key
 D) The table must be in BCNF
Answer: B
39. Which of the following is an example of a table in First Normal Form (1NF)?
 A) A table where all attributes have atomic values
 B) A table with composite and multi-valued attributes
 C) A table with transitive dependencies
 D) A table where each attribute depends on part of the primary key
Answer: A
40. What is the purpose of closure in functional dependency theory?
 A) To determine all functional dependencies that can be inferred from a set of
dependencies
 B) To eliminate redundant data
 C) To optimize database queries
 D) To enforce referential integrity
Answer: A
41. What is the main requirement for a table to be in Second Normal Form
(2NF)?
 A) It must have no transitive dependencies
 B) It must have no partial dependencies
 C) It must have no non-atomic attributes
 D) It must be in BCNF
Answer: B
42. In the context of normalization, which of the following is a candidate key?
 A) A set of attributes that uniquely identifies a tuple
 B) A foreign key used to reference another table
 C) A key that can be NULL
 D) A key that does not uniquely identify a tuple
Answer: A
43. Which of the following is true for a relation in Third Normal Form (3NF)?
 A) It eliminates all multi-valued dependencies
 B) It allows transitive dependencies
 C) It must not have any transitive dependencies
 D) It eliminates all functional dependencies
Answer: C
44. Which of the following is an example of Second Normal Form (2NF)
violation?
 A) A table where non-key attributes depend on only part of a composite key
 B) A table where all attributes depend on the entire primary key
 C) A table with no atomic values
 D) A table with only one candidate key
Answer: A
45. In functional dependency theory, what does the augmentation rule state?
 A) If X→Y, then XZ→YZ
 B) If X→Y, then Y→X
 C) If X→Y, then X→Z
 D) If X→Y, then Y→Z
Answer: A
46. Which of the following is a characteristic of a table in Boyce-Codd Normal
Form (BCNF)?
 A) Every determinant is a superkey
 B) The table allows partial dependencies
 C) The table allows transitive dependencies
 D) The table must have only one candidate key
Answer: A
47. What is the purpose of the projection operation in relational algebra?
 A) To select specific columns from a relation
 B) To group rows based on specific columns
 C) To join two or more relations
 D) To filter rows based on a condition
Answer: A
48. What is the result of the following SQL query?
sql
Copy code
SELECT AVG(Salary)
FROM Employees
WHERE Department = 'IT';
 A) The average salary of all employees
 B) The total salary of all employees in the IT department
 C) The average salary of employees in the IT department
 D) The number of employees in the IT department
Answer: C
49. Which SQL clause is used to specify the grouping of rows based on a
condition?
 A) GROUP BY
 B) ORDER BY
 C) HAVING
 D) WHERE
Answer: A
50. In SQL, what does the FOREIGN KEY constraint enforce?
 A) It ensures that values in a column correspond to values in another table's primary key
 B) It ensures that each row is unique
 C) It prevents NULL values in the column
 D) It sets a default value for a column
Answer: A

Unit-V

1. What is a transaction in a database system?


 A) A sequence of operations that is treated as a single unit of work
 B) A query that retrieves data from multiple tables
 C) A backup process for data recovery
 D) A method for normalizing tables
Answer: A
2. Which of the following is NOT a desirable property of transactions?
 A) Atomicity
 B) Consistency
 C) Durability
 D) Inconsistency
Answer: D
3. What does the atomicity property of a transaction ensure?
 A) A transaction can be partially completed
 B) A transaction is either fully completed or fully aborted
 C) A transaction can be split into multiple sub-transactions
 D) A transaction always finishes faster
Answer: B
4. Which property of a transaction ensures that the database remains in a
consistent state after the transaction?
 A) Durability
 B) Isolation
 C) Consistency
 D) Concurrency
Answer: C
5. What is the durability property of a transaction?
 A) Once a transaction is committed, its effects are permanent, even if the system crashes
 B) A transaction can be reversed at any time
 C) Transactions are processed in parallel
 D) A transaction takes minimal time to complete
Answer: A
6. What does the isolation property of a transaction ensure?
 A) A transaction executes independently of other transactions
 B) A transaction is executed in real-time
 C) Multiple transactions can share the same data at the same time
 D) A transaction can be split into multiple parts
Answer: A
7. Which of the following best defines serializability in transaction processing?
 A) The ability to execute transactions in parallel
 B) The execution of transactions in a way that produces the same result as serial
execution
 C) The ability to rollback transactions if they fail
 D) The ability to distribute transactions across multiple systems
Answer: B
8. What is the purpose of concurrency control in transaction processing?
 A) To ensure that transactions are executed serially
 B) To allow multiple transactions to access the database simultaneously without
conflicting
 C) To optimize the speed of transactions
 D) To guarantee the atomicity of transactions
Answer: B
9. Which of the following is a concurrency control technique?
 A) Backup and recovery
 B) Two-phase locking
 C) Foreign key constraints
 D) Query optimization
Answer: B
10. What is the primary purpose of locking techniques in transaction processing?
 A) To prevent deadlocks between transactions
 B) To prevent multiple transactions from accessing the same data simultaneously
 C) To rollback transactions in case of failure
 D) To enforce integrity constraints
Answer: B
11. What is a deadlock in transaction processing?
 A) A situation where two or more transactions are waiting indefinitely for each other to
release resources
 B) A method to rollback transactions that failed
 C) A technique to execute transactions in parallel
 D) A state where all transactions are completed successfully
Answer: A
12. What is the two-phase locking protocol?
 A) A locking protocol that allows transactions to acquire locks in a growing phase and
release them in a shrinking phase
 B) A protocol that allows transactions to acquire and release locks simultaneously
 C) A method for executing transactions in serial order
 D) A protocol that eliminates the possibility of deadlocks
Answer: A
13. In two-phase locking, what happens during the growing phase?
 A) A transaction can only acquire locks but cannot release them
 B) A transaction can release locks but cannot acquire new ones
 C) A transaction can neither acquire nor release locks
 D) A transaction can both acquire and release locks
Answer: A
14. What happens during the shrinking phase of two-phase locking?
 A) A transaction can release locks but cannot acquire new locks
 B) A transaction can acquire new locks
 C) A transaction is executed in parallel with others
 D) A transaction is aborted and rolled back
Answer: A
15. Which of the following is a locking-based concurrency control technique?
 A) Time-stamp ordering
 B) Optimistic concurrency control
 C) Deadlock detection
 D) Two-phase locking
Answer: D
16. What is the timestamp ordering method in concurrency control?
 A) A method that assigns timestamps to transactions and ensures that older transactions
get executed first
 B) A method that allows transactions to acquire locks based on their priority
 C) A technique that prevents transactions from being aborted
 D) A method for detecting and resolving deadlocks
Answer: A
17. Which of the following problems can occur due to concurrent transaction
execution?
 A) Atomicity
 B) Lost update
 C) Consistency
 D) Durability
Answer: B
18. What is the purpose of the wait-die scheme in concurrency control?
 A) To prevent deadlocks by allowing older transactions to wait and younger ones to be
aborted
 B) To allow all transactions to be executed in parallel
 C) To allow transactions to acquire locks as needed
 D) To prioritize read operations over write operations
Answer: A
19. What is the wound-wait scheme in deadlock prevention?
 A) An older transaction forces a younger transaction to abort and release its locks
 B) A younger transaction forces an older transaction to wait
 C) Transactions execute independently of each other
 D) Transactions are executed serially
Answer: A
20. Which of the following is an example of a write lock?
 A) A lock that allows only read operations on a data item
 B) A lock that allows both read and write operations on a data item
 C) A lock that prevents both reading and writing
 D) A lock that can be acquired by multiple transactions simultaneously
Answer: B
21. What is a shared lock in transaction processing?
 A) A lock that allows multiple transactions to read the data but prevents any transaction
from writing
 B) A lock that allows only one transaction to read the data
 C) A lock that allows multiple transactions to write to the data simultaneously
 D) A lock that prevents all access to the data
Answer: A
22. What is an exclusive lock in transaction processing?
 A) A lock that allows both reading and writing of data
 B) A lock that prevents all other transactions from reading or writing the data
 C) A lock that only allows other transactions to read the data
 D) A lock that allows read-only access to the data
Answer: B
23. What is dirty read in transaction processing?
 A) Reading uncommitted data from a transaction that may be rolled back later
 B) Reading data that has been deleted from the database
 C) Reading committed data from multiple transactions
 D) Reading data after a transaction has failed
Answer: A
24. What is a phantom read in transaction processing?
 A) A situation where a transaction reads a set of rows that satisfy a condition, but a
second transaction inserts or deletes rows, making them invisible or visible
 B) A situation where a transaction reads the same data twice but sees different values
 C) A situation where data is deleted but still readable
 D) A situation where read operations are blocked
Answer: A
25. What is the purpose of the recovery management component in a DBMS?
 A) To ensure that all transactions follow the ACID properties
 B) To recover the database to a consistent state after a failure
 C) To improve the performance of transactions
 D) To handle deadlock situations
Answer: B
26. What is the read committed isolation level in transaction processing?
 A) A level that allows transactions to only read data that has already been committed
 B) A level that allows transactions to read uncommitted data
 C) A level that allows transactions to read and write simultaneously
 D) A level that prioritizes read operations
Answer: A
27. What is a serial schedule in transaction processing?
 A) A schedule in which transactions are executed one after the other without overlapping
 B) A schedule that allows multiple transactions to execute concurrently
 C) A schedule that ensures atomicity in all transactions
 D) A schedule that involves distributed transactions
Answer: A
28. Which of the following is an example of optimistic concurrency control?
 A) Transactions are executed without acquiring locks but are checked for conflicts at the
time of commit
 B) Transactions acquire locks and hold them until the transaction completes
 C) Transactions are aborted if they detect a conflict with another transaction
 D) Transactions execute serially to avoid conflicts
Answer: A
29. Which of the following describes a lost update problem?
 A) Two transactions update the same data item, but one update is overwritten by the other
 B) A transaction reads uncommitted data that is later rolled back
 C) A transaction inserts a new record that another transaction deletes
 D) A transaction reads data from a failed transaction
Answer: A
30. In a time-stamp ordering protocol, how are transactions ordered?
 A) Based on the order in which transactions are received
 B) Based on the time at which transactions start execution
 C) Based on the number of locks held by each transaction
 D) Based on the size of each transaction
Answer: B
31. Which of the following is a potential issue with the cascading rollback
phenomenon?
 A) If one transaction is rolled back, it may cause other dependent transactions to be rolled
back as well
 B) It causes multiple transactions to be aborted at the same time
 C) It allows transactions to execute out of order
 D) It prevents transactions from acquiring necessary locks
Answer: A
32. What is the purpose of a log-based recovery system in transaction
processing?
 A) To keep track of all changes made by transactions for recovery purposes
 B) To execute transactions in serial order
 C) To optimize the speed of queries
 D) To perform deadlock detection
Answer: A
33. Which of the following is a checkpoint in transaction recovery?
 A) A point at which all committed changes are saved to the database, allowing recovery
to start from that point
 B) A point at which transactions are aborted and rolled back
 C) A point at which transactions are allowed to commit
 D) A point at which deadlocks are resolved
Answer: A
34. In write-ahead logging (WAL), what must happen before the actual data is
written to the database?
 A) The corresponding log records must be written to stable storage
 B) The transaction must be committed
 C) The transaction must acquire all necessary locks
 D) The data must be deleted
Answer: A
35. What is the no-steal policy in transaction recovery?
 A) Dirty pages cannot be written to disk before the transaction commits
 B) A transaction cannot release locks until it is completed
 C) A transaction cannot be aborted until it finishes
 D) A transaction can only steal resources from other transactions
Answer: A
36. In distributed transactions, what is the two-phase commit protocol (2PC)
used for?
 A) To ensure that all participants in a distributed transaction either commit or abort the
transaction together
 B) To allow transactions to execute independently across multiple systems
 C) To prevent deadlocks in a distributed database
 D) To improve the performance of distributed queries
Answer: A
37. What is the primary challenge of distributed transaction processing?
 A) Ensuring that transactions are executed serially across multiple systems
 B) Coordinating and maintaining consistency across multiple databases involved in the
transaction
 C) Executing transactions as quickly as possible
 D) Preventing deadlocks in a single database
Answer: B
38. What does the prepare phase of the two-phase commit protocol (2PC)
involve?
 A) Each participating node agrees to commit or abort the transaction
 B) All nodes commit the transaction
 C) All locks are released
 D) The transaction is aborted
Answer: A
39. What happens during the commit phase of the two-phase commit protocol
(2PC)?
 A) All participating nodes commit the transaction
 B) The transaction is aborted if any participant votes to abort
 C) All locks are released, and the transaction is rolled back
 D) A new transaction is started
Answer: A
40. Which of the following is an example of a distributed deadlock?
 A) Two transactions, running on different databases, wait for resources held by each
other
 B) Two transactions wait for each other to release resources in the same database
 C) A transaction is aborted due to failure in a remote database
 D) Transactions are committed serially
Answer: A
41. What is the purpose of the read-uncommitted isolation level?
 A) To allow a transaction to read uncommitted data from other transactions
 B) To allow transactions to be executed serially
 C) To prevent transactions from reading data until it is committed
 D) To allow multiple write operations on the same data
Answer: A
42. What is the read-repeatable isolation level?
 A) It ensures that once a transaction reads data, no other transaction can modify that data
until the first transaction completes
 B) It allows multiple transactions to read the same data at the same time
 C) It prevents all read operations on the data
 D) It allows a transaction to read uncommitted data
Answer: A
43. Which of the following is a recovery technique for dealing with transaction
failures?
 A) Log-based recovery
 B) Shadow paging
 C) Query optimization
 D) Write-ahead logging
Answer: B
44. Which of the following best describes shadow paging in transaction recovery?
 A) A technique where the database maintains a shadow copy of the pages being updated
 B) A method for optimizing query performance
 C) A technique for detecting deadlocks in distributed systems
 D) A way to enforce serializability in transaction processing
Answer: A
45. Which of the following isolation levels prevents dirty reads, but allows non-
repeatable reads?
 A) Read committed
 B) Serializable
 C) Read uncommitted
 D) Repeatable read
Answer: A
46. What is the purpose of the phantom prevention technique in transaction
processing?
 A) To prevent new rows from being added or deleted during a transaction that might
change the result of a query
 B) To ensure that transactions are executed serially
 C) To prevent transactions from being aborted
 D) To detect and resolve deadlocks in the database
Answer: A
47. In the context of distributed databases, what is data fragmentation?
 A) The process of dividing a database into smaller pieces to be stored across different
sites
 B) The process of merging data from different tables
 C) The process of replicating data across multiple databases
 D) The process of backing up data at regular intervals
Answer: A
48. Which of the following is a technique for deadlock detection in distributed
databases?
 A) Wait-for graph
 B) Two-phase commit protocol
 C) Time-stamp ordering
 D) Optimistic concurrency control
Answer: A
49. In distributed databases, what is the purpose of data replication?
 A) To store copies of data at multiple sites for fault tolerance and improved availability
 B) To divide data into fragments for efficient querying
 C) To allow transactions to execute serially
 D) To enforce foreign key constraints
Answer: A
50. Which of the following is an optimistic concurrency control technique?
 A) Transactions execute without locks and are validated at the end for conflicts
 B) Transactions acquire locks before execution
 C) Transactions are aborted as soon as a conflict is detected
 D) Transactions are serialized to prevent conflicts
Answer: A

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy