Dbms 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

DATABASE MANAGEMENT

SYSTEM – ETE MCQ

STUDYBOOSTERS
ELEVATE YOUR EXAM GAME
Short Notes
Unit 1

1. Purpose of Database Systems: A database system is designed to manage large amounts of


data by providing a structured way to store, manage, and retrieve data. It provides efficient
access to data and helps in maintaining data accuracy, consistency, and security.
2. Components of DBMS: The components of a database management system (DBMS) include
the data, software, hardware, and users. The software includes the database engine, query
language, and programming interfaces, while the hardware includes the server and storage
devices.
3. Applications of DBMS: DBMS has many applications, including inventory management,
customer relationship management, human resources management, and financial
management. It is used in almost every field where large amounts of data need to be
managed.
4. Three-tier DBMS Architecture: The three-tier DBMS architecture is a client-server model that
separates the database functionality into three tiers: the user interface, the application server,
and the database server. The user interface communicates with the application server, which
in turn communicates with the database server.
5. Data Independence: Data independence refers to the ability to modify the schema without
affecting the application programs that access the data. There are two types of data
independence: physical data independence and logical data independence.
6. Database Schema: The database schema is the blueprint of the database, which defines the
structure of the database, including tables, columns, and relationships. It provides a
framework for organizing the data and facilitates data manipulation.
7. Database Instance: A database instance is a collection of memory structures and processes
that manage the database. It includes the database buffer cache, shared pool, and
background processes.
8. Data Modeling: Data modeling is the process of creating a conceptual representation of data
and its relationships to other data. It helps to identify the entities, attributes, and
relationships between them.
9. Entity Relationship Model: The entity-relationship (ER) model is a conceptual data model that
represents the entities, attributes, and relationships between them. It is widely used in
database design and provides a graphical representation of the data.
10. Relational Model: The relational model is a data model that represents data as a collection of
tables. Each table represents a set of related data, and each row in the table represents a
unique instance of that data.
11. Normalization: Normalization is the process of organizing data in a database by eliminating
redundant data and ensuring data integrity. It helps to reduce data duplication, minimize
data update anomalies, and improve data consistency.

P a g e 1 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


12. Database Query: A database query is a request to retrieve or modify data in a database. It is
written in a query language, such as SQL, and returns a set of results that meet the specified
criteria.
13. Database Backup and Recovery: Database backup and recovery is the process of creating a
copy of the database and restoring it in the event of a failure or data loss. It is essential to
ensure data availability and prevent data loss.
14. Database Security: Database security is the practice of protecting data from unauthorized
access, modification, or disclosure. It includes access control, encryption, and auditing to
ensure data confidentiality, integrity, and availability.
15. Database Administration: Database administration is the process of managing and
maintaining the database system, including performance monitoring, backup and recovery,
security management, and user management. It is critical to ensure the smooth operation of
the database system.

Unit 2

1. Relational Algebra: Relational algebra is a mathematical language used to


manipulate data in a relational database. It consists of a set of operations that
can be used to retrieve data from one or more tables.
2. Data Definition Language (DDL): DDL is a set of SQL statements used to create
and modify database objects, such as tables, indexes, and views. It defines the
structure of the database and the relationships between tables.
3. Data Manipulation Language (DML): DML is a set of SQL statements used to
manipulate data in the database. It includes SELECT, INSERT, UPDATE, and
DELETE statements.
4. Data Control Language (DCL): DCL is a set of SQL statements used to control
access to the database. It includes GRANT and REVOKE statements, which are
used to grant or revoke privileges to users.
5. Transaction Control Language (TCL): TCL is a set of SQL statements used to
manage transactions in the database. It includes COMMIT, ROLLBACK, and
SAVEPOINT statements.
6. Integrity Constraints: Integrity constraints are rules that ensure data accuracy and
consistency. They are used to enforce data integrity and prevent data corruption.
Common constraints include primary key, foreign key, unique, and check
constraints.
7. Database Keys: Database keys are used to identify unique records in a table. They
are used to enforce data integrity and ensure data consistency. Common keys
include primary key, foreign key, and candidate key.

P a g e 2 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


8. SQL Basic Operations: SQL basic operations include SELECT, INSERT, UPDATE, and
DELETE statements. These statements are used to manipulate data in the
database.
9. Aggregate Functions: Aggregate functions are used to perform calculations on
data in the database. Common aggregate functions include COUNT, SUM, AVG,
MIN, and MAX.
10. SQL Joins: SQL joins are used to combine data from two or more tables. Common
join types include inner join, left outer join, right outer join, and full outer join.
11. Set Operators: Set operators are used to combine data from two or more SELECT
statements. Common set operators include UNION, UNION ALL, INTERSECT, and
EXCEPT.
12. Views: Views are virtual tables that are based on the result of a SELECT statement.
They are used to simplify complex queries and provide a simplified view of the
data.
13. Subqueries: Subqueries are SELECT statements that are nested inside another
SELECT statement. They are used to retrieve data that is used as input for another
query. Common subquery types include correlated subqueries and non-
correlated subqueries.
14. Indexes: Indexes are used to improve query performance by allowing the
database to quickly retrieve data based on a specified column or set of columns.
Common index types include clustered index, non-clustered index, and unique
index.
15. Triggers: Triggers are special types of stored procedures that are automatically
executed in response to a specific event, such as a data modification. They are
used to enforce business rules and ensure data integrity.

Unit 3

1. Data Integrity Rules: Data integrity rules are used to ensure that data is accurate and
consistent. They include constraints such as primary key, foreign key, unique, and check
constraints.
2. Functional Dependency: Functional dependency is a relationship between two attributes in a
table, where one attribute determines the value of another attribute. It is used to ensure that
data is consistent and accurate.
3. Need for Normalization: Normalization is the process of organizing data in a database to
reduce redundancy and improve data consistency. It is needed to ensure data accuracy and
prevent data anomalies.

P a g e 3 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


4. First Normal Form (1NF): First normal form is a database normalization technique that
ensures that each column in a table contains atomic values. It eliminates repeating groups
and ensures that each row in a table is unique.
5. Second Normal Form (2NF): Second normal form is a database normalization technique that
ensures that each non-key attribute in a table is dependent on the entire primary key, rather
than just a part of it. It eliminates partial dependencies and ensures data consistency.
6. Third Normal Form (3NF): Third normal form is a database normalization technique that
ensures that each non-key attribute in a table is dependent only on the primary key, and not
on other non-key attributes. It eliminates transitive dependencies and ensures data
consistency.
7. Boyce-Codd Normal Form (BCNF): Boyce-Codd normal form is a database normalization
technique that ensures that each non-trivial functional dependency in a table is a
dependency on a candidate key. It eliminates redundancies and ensures data consistency.
8. Multivalued Dependencies: Multivalued dependencies are used to represent relationships
between attributes in a table where there are multiple values for each attribute. They are
used to eliminate redundancies and ensure data consistency.
9. Fourth Normal Form (4NF): Fourth normal form is a database normalization technique that
ensures that each non-trivial multivalued dependency in a table is represented by a separate
table. It eliminates redundancies and ensures data consistency.
10. Join Dependencies: Join dependencies are used to represent relationships between tables
where the tables can only be joined in certain ways. They are used to eliminate redundancies
and ensure data consistency.
11. Fifth Normal Form (5NF): Fifth normal form is a database normalization technique that
ensures that each non-trivial join dependency in a table is represented by a separate table. It
eliminates redundancies and ensures data consistency.
12. Pitfalls in Relational Database Design: Common pitfalls in relational database design include
ignoring normalization rules, using inappropriate data types, not using appropriate
constraints, and not considering performance implications.

Unit 4

1. Transaction System Concepts: A transaction is a sequence of operations that are executed as


a single unit of work. A transaction system is a software system that manages transactions to
ensure that they are executed correctly and reliably.
2. Desirable Properties of Transactions: The desirable properties of transactions include
atomicity, consistency, isolation, and durability. Atomicity ensures that a transaction is treated
as a single, indivisible unit of work. Consistency ensures that a transaction does not violate
any integrity constraints. Isolation ensures that a transaction does not interfere with other
transactions. Durability ensures that the effects of a transaction are permanent.
3. Schedules: A schedule is a sequence of operations that are executed by a transaction system.
A schedule can be serial or concurrent. A serial schedule is a sequence of operations that are

P a g e 4 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


executed one after the other, while a concurrent schedule is a sequence of operations that
are executed simultaneously by multiple transactions.
4. Serializability of Schedules: Serializability is the property of a schedule that ensures that it is
equivalent to a serial schedule. A serializable schedule ensures that the outcome of a
concurrent schedule is the same as that of a serial schedule.
5. Concurrency Control: Concurrency control is the process of managing access to shared
resources in a concurrent transaction processing environment. It ensures that transactions
execute correctly and reliably in a multi-user environment.
6. Recoverability: Recoverability is the ability of a transaction system to restore a database to a
consistent state after a failure. It ensures that the effects of incomplete transactions are
undone and that the database is consistent.

In summary, database transaction processing involves managing transactions to ensure that they are
executed correctly and reliably. Desirable properties of transactions include atomicity, consistency,
isolation, and durability. Schedules can be serial or concurrent, and serializability ensures that
concurrent schedules are equivalent to serial schedules. Concurrency control and recoverability are
important considerations in transaction processing.

Unit 5

1. Flow Control Statements: Flow control statements are programming constructs


that allow for conditional execution of code. Examples of flow control statements
in databases include IF-THEN-ELSE statements, WHILE loops, and CASE
statements.
2. Functions: Functions are database objects that return a value based on input
parameters. They can be used to perform calculations, manipulate data, and
retrieve information from the database.
3. Stored Procedures: Stored procedures are precompiled sets of SQL statements
that can be executed as a single unit of work. They can be used to encapsulate
business logic, perform complex data manipulations, and enforce data integrity
constraints.
4. Cursors: Cursors are database objects that allow for sequential processing of
data. They can be used to perform operations on each row of a result set or to
iterate through a table.
5. Triggers: Triggers are database objects that are automatically executed in
response to certain events, such as INSERT, UPDATE, or DELETE operations. They
can be used to enforce business rules, maintain data integrity, and audit database
activity.

P a g e 5 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


6. Exception Handling: Exception handling is the process of detecting and
responding to errors in a database. It involves using try-catch blocks or error
handling functions to handle errors and recover from them gracefully.

In summary, programming constructs in databases include flow control statements,


functions, stored procedures, cursors, triggers, and exception handling. These constructs
can be used to perform complex data manipulations, enforce data integrity constraints,
and respond to database events.

Unit 6

1. File Organizations and Types: File organization refers to the way data is stored in
a database file. Different types of file organizations include sequential, indexed,
and hashed. Sequential files store data in a sequential order, while indexed files
use an index to locate data. Hashed files use a hash function to determine where
data is stored.
2. Indexing and Types: Indexing is the process of creating an index to improve data
retrieval performance. Different types of indexing include B-tree indexing, bitmap
indexing, and hash indexing. B-tree indexing is commonly used in relational
databases, while bitmap indexing is used for data warehousing. Hash indexing is
used in hashed file organization.
3. Hashing and Techniques: Hashing is a technique used to map data to a location
in a file using a hash function. Different techniques for hashing include linear
probing, quadratic probing, and chaining. Linear probing and quadratic probing
involve searching for an empty slot in the file, while chaining involves storing
data in a linked list.
4. Introduction to Big Data: Big data refers to large and complex data sets that
cannot be processed using traditional data processing methods. Big data is
characterized by volume, variety, and velocity. Big data technologies, such as
Hadoop and Spark, are used to process and analyze big data.
5. NoSQL Systems: NoSQL systems are non-relational databases that are used to
store and manage unstructured or semi-structured data. NoSQL systems are
characterized by their scalability, high availability, and flexibility. Different types of
NoSQL systems include document-based, key-value, and column-family
databases.

In summary, file organization and indexing are important considerations in database


design and performance optimization. Hashing is a useful technique for locating data in
P a g e 6 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


a hashed file organization. Big data technologies and NoSQL systems are used to
manage and process large and complex data sets.

P a g e 7 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


UNIT 1 Introduction to Databases

1. What is the purpose of a database system?


a) To store and manage data
b) To perform complex calculations
c) To create user interfaces
d) None of the above

2. What are the components of a DBMS?


a) Hardware, software, and users
b) Database, DBMS software, and users
c) Database, network, and servers
d) None of the above

3. What are some applications of a DBMS?


a) Banking systems
b) Inventory management systems
c) Human resource management systems
d) All of the above

4. What is the three-tier DBMS architecture?


a) Presentation layer, application layer, and database layer
b) Database layer, network layer, and application layer
c) Application layer, database layer, and user layer
d) None of the above

5. What is data independence in DBMS?


a) The ability to change the database schema without changing the application
program
b) The ability to change the application program without changing the database
schema
c) The ability to change the network topology without affecting the database
d) None of the above

6. What is a database schema?


a) A blueprint of the database structure
b) A data model used to design the database
c) A set of rules used to enforce data integrity
d) All of the above

7. What is a database instance?


a) A copy of the database used for testing
b) The actual database as it exists at a particular moment in time
c) A snapshot of the database taken at a specific point in time
d) None of the above

8. What is data modeling?

P a g e 8 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


a) The process of designing a database schema
b) The process of creating a database instance
c) The process of creating a database backup
d) None of the above

9. What is the entity-relationship model?


a) A data model used to design relational databases
b) A data model used to design object-oriented databases
c) A data model used to design hierarchical databases
d) None of the above

10. What is the relational model?


a) A data model that organizes data into one or more tables
b) A data model that organizes data into a tree-like structure
c) A data model that organizes data into a network-like structure
d) None of the above

11. What is a relation in the relational model?


a) A set of data organized into rows and columns
b) A set of data organized into a tree-like structure
c) A set of data organized into a network-like structure
d) None of the above

12. What is a primary key in the relational model?


a) A column or set of columns that uniquely identifies a row in a table
b) A column or set of columns that is used to order the rows in a table
c) A column or set of columns that contains the most important data in a table
d) None of the above

13. What is a foreign key in the relational model?


a) A column or set of columns that is used to order the rows in a table
b) A column or set of columns that uniquely identifies a row in a table
c) A column or set of columns that references a primary key in another table
d) None of the above

14. What is a join in the relational model?


a) A way of combining data from two or more tables based on a related column
b) A way of deleting data from a table
c) A way of updating data in a table
d) None of the above

15. What is a view in the relational model?

a) A virtual table that is created from the data in one or more tables
b) A physical table that is created by the database system
c) A table that is used to store temporary data
d) None of the above

16. What is a transaction in DBMS?


P a g e 9 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


a) A unit of work that is performed by a database user or application
b) A set of instructions that are executed by the database system
c) A program that is used to access the database
d) None of the above

17. What is ACID in DBMS?


a) A set of properties that ensure reliable processing of transactions
b) A data model used to design hierarchical databases
c) A set of rules used to enforce data integrity
d) None of the above

18. What is a database trigger?


a) A set of instructions that are automatically executed by the database system in
response to a specific event
b) A program that is used to access the database
c) A table that is used to store temporary data
d) None of the above

19. What is a stored procedure?


a) A precompiled program that is stored in the database and can be executed by a
user or application
b) A table that is used to store temporary data
c) A set of instructions that are automatically executed by the database system in
response to a specific event
d) None of the above

20. What is a database index?


a) A data structure used to improve the performance of queries on a table
b) A table that is used to store temporary data
c) A set of rules used to enforce data integrity
d) None of the above

21. What is a database constraint?


a) A set of rules used to enforce data integrity
b) A program that is used to access the database
c) A table that is used to store temporary data
d) None of the above

22. What is data redundancy in DBMS?


a) The duplication of data in a database
b) The elimination of data from a database
c) The optimization of data in a database
d) None of the above

23. What is data normalization?


a) The process of removing data redundancy from a database
b) The process of duplicating data in a database
c) The process of optimizing data in a database
d) None of the above

P a g e 10 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


24. What is denormalization?
a) The process of introducing data redundancy into a database for performance
reasons
b) The process of removing data redundancy from a database
c) The process of optimizing data in a database
d) None of the above

25. What is a data warehouse?


a) A large, centralized repository of data from multiple sources
b) A small, decentralized repository of data from a single source
c) A database used for online transaction processing
d) None of the above

26. What is data mining?


a) The process of analyzing large amounts of data to discover patterns and
relationships
b) The process of optimizing data in a database
c) The process of removing data redundancy from a database
d) None of the above

27. What is OLAP?


a) Online Analytical Processing
b) Online Application Processing
c) Online Accounting Processing
d) None of the above

28. What is OLTP?


a) Online Transaction Processing
b) Online Testing Platform
c) Online Telephony Protocol
d) None of the above

29. What is a backup in DBMS?


a) A copy of the database used for recovery in case of a failure
b) A program that is used to access the database
c) A set of rules used to enforce data integrity
d) None of the above

30. What is a recovery in DBMS?


a) The process of restoring a database to a consistent state after a failure
b) The process of creating a backup of a database
c) The process of optimizing the performance of a database
d) None of the above

31. What is a database administrator (DBA)?


a) The person responsible for managing the database system
b) The person responsible for designing the database schema
c) The person responsible for executing queries on the database

P a g e 11 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


d) None of the above

32. What is data modeling?


a) The process of creating a conceptual representation of data
b) The process of optimizing the performance of a database
c) The process of creating a backup of a database
d) None of the above

33. What is the entity-relationship (ER) model?


a) A data model used to describe the structure of data in a database
b) A data model used to design hierarchical databases
c) A data model used to describe the behavior of a database
d) None of the above

34. What is a relationship in the ER model?


a) A connection between two entities
b) A constraint on a table in the database
c) A type of data structure used to improve query performance
d) None of the above

35. What is a cardinality in the ER model?


a) The number of instances of one entity that can be associated with an instance of
another entity
b) The number of tables in a database
c) The number of attributes in a table
d) None of the above

36. What is the relational model?


a) A data model used to describe the structure of data in a database
b) A data model used to design hierarchical databases
c) A data model used to describe the behavior of a database
d) None of the above

37. What is a table in the relational model?


a) A two-dimensional representation of data in rows and columns
b) A data structure used to improve query performance
c) A connection between two entities in the ER model
d) None of the above

38. What is a primary key in the relational model?


a) An attribute or set of attributes that uniquely identifies each row in a table
b) A constraint on a table in the database
c) A type of data structure used to improve query performance
d) None of the above

39. What is a foreign key in the relational model?


a) An attribute or set of attributes in one table that refers to the primary key in
another table
b) A constraint on a table in the database

P a g e 12 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


c) A type of data structure used to improve query performance
d) None of the above

40. What is a join in the relational model?


a) A way to combine data from two or more tables based on a related attribute
b) A constraint on a table in the database
c) A type of data structure used to improve query performance
d) None of the above

UNIT 2 Relational query language

1. What is the Relational Query Language (RQL)?


a) A programming language used to manipulate data in a relational database
b) A query language used to retrieve and manipulate data in a relational database
c) A language used to design the structure of a relational database
d) None of the above

2. What is relational algebra?


a) A procedural query language used to manipulate data in a relational database
b) A set of mathematical operators used to manipulate data in a relational database
c) A language used to design the structure of a relational database
d) None of the above

3. What is a Data Definition Language (DDL)?


a) A language used to define and modify the structure of a database
b) A language used to retrieve and manipulate data in a database
c) A language used to control access to a database
d) None of the above

4. What is Data Manipulation Language (DML)?


a) A language used to define and modify the structure of a database
b) A language used to retrieve and manipulate data in a database
c) A language used to control access to a database
d) None of the above

5. What is Transaction Control Language (TCL)?


a) A language used to define and modify the structure of a database
b) A language used to retrieve and manipulate data in a database
c) A language used to control transactions in a database
d) None of the above

6. What are integrity constraints in DBMS?


a) Rules that must be enforced to maintain the integrity of the database
b) Rules that allow users to modify the database
c) Rules that define the structure of the database
d) None of the above

P a g e 13 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


7. What are database keys?
a) Attributes or sets of attributes that uniquely identify each row in a table
b) Rules that must be enforced to maintain the integrity of the database
c) Rules that allow users to modify the database
d) None of the above

8. What is SQL?
a) A programming language used to manipulate data in a relational database
b) A query language used to retrieve and manipulate data in a relational database
c) A language used to design the structure of a relational database
d) None of the above

9. What are the basic operations in SQL?


a) SELECT, INSERT, UPDATE, DELETE
b) ADD, DELETE, EDIT, SAVE
c) CREATE, READ, UPDATE, DELETE
d) None of the above

10. What are Aggregate functions in SQL?


a) Functions that perform a calculation on a set of values and return a single value
b) Functions that join two or more tables based on a related attribute
c) Functions that retrieve data from a database
d) None of the above

11. What are SQL Joins?


a) A way to combine data from two or more tables based on a related attribute
b) A way to manipulate data in a relational database
c) A way to control access to a database
d) None of the above

12. What are set operators in SQL?


a) Operators used to perform operations on two or more sets of data
b) Operators used to manipulate data in a relational database
c) Operators used to control access to a database
d) None of the above

13. What are views in SQL?


a) Virtual tables that do not actually exist in the database
b) Tables that are created by combining data from two or more tables
c) Tables that are used to store data temporarily
d) None of the above

14. What is a database trigger in SQL?


a) A program that automatically executes in response to certain events
b) A program that retrieves data from a database
c) A program that modifies the structure of a database
d) None of the above

P a g e 14 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


15. What is the purpose of the SELECT statement in SQL?
a) To retrieve data from a table or set of tables
b) To insert data into a table
c) To delete data from a table
d) None of the above

16. What is the purpose of the INSERT statement in SQL?


a) To retrieve data from a table or set of tables
b) To insert data into a table
c) To delete data from a table
d) None of the above

17. What is the purpose of the UPDATE statement in SQL?


a) To retrieve data from a table or set of tables
b) To insert data into a table
c) To update data in a table
d) None of the above

18. What is the purpose of the DELETE statement in SQL?


a) To retrieve data from a table or set of tables
b) To insert data into a table
c) To delete data from a table
d) None of the above

19. What is a stored procedure in SQL?


a) A set of SQL statements that can be executed as a single unit
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

20. What is a cursor in SQL?


a) A pointer to a row in a table
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

21. What is a trigger in SQL?


a) A program that is automatically executed in response to certain events
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

22. What is a constraint in SQL?


a) A rule that must be enforced to maintain the integrity of the database
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

23. What is a primary key in SQL?


P a g e 15 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


a) A constraint that uniquely identifies each row in a table
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

24. What is a foreign key in SQL?


a) A constraint that refers to the primary key of another table
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

25. What is a join in SQL?


a) A way to combine data from two or more tables based on a related attribute
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

26. What is an inner join in SQL?


a) A join that returns only the rows that have matching values in both tables
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

27. What is an outer join in SQL?


a) A join that returns all the rows from one table and matching rows from another
table
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

28. What is a left outer join in SQL?


a) A join that returns all the rows from the left table and matching rows from the
right table
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

29. What is a right outer join in SQL?


a) A join that returns all the rows from the right table and matching rows from the
left table
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

30. What is a full outer join in SQL?


a) A join that returns all the rows from both tables
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

P a g e 16 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


31. What is a view in SQL?
a) A virtual table that is based on the result of a SQL statement
b) A table that is used to store data temporarily
c) A way to combine data from two or more tables based on a related attribute
d) None of the above

32. What is a subquery in SQL?


a) A query that is embedded within another query
b) A virtual table that retrieves data from two or more tables
c) A table that is used to store data temporarily
d) None of the above

33. What are aggregate functions in SQL?


a) Functions that operate on a set of rows and return a single value
b) Functions that retrieve data from a database
c) Functions that modify data in a database
d) None of the above

34. What is the purpose of the GROUP BY clause in SQL?


a) To group rows with the same value in a specific column
b) To sort rows in a table
c) To retrieve data from a database
d) None of the above

35. What is the purpose of the HAVING clause in SQL?


a) To filter rows based on a condition applied to a group of rows
b) To sort rows in a table
c) To retrieve data from a database
d) None of the above

36. What are set operators in SQL?


a) Operators that combine the result of two or more queries
b) Operators that retrieve data from a database
c) Operators that modify data in a database
d) None of the above

37. What is the purpose of the UNION operator in SQL?


a) To combine the result of two or more SELECT statements and remove duplicate
rows
b) To combine the result of two or more SELECT statements and retain duplicate
rows
c) To combine the result of two or more UPDATE statements
d) None of the above

38. What is the purpose of the INTERSECT operator in SQL?


a) To return the common rows between two SELECT statements
b) To return all the rows from two SELECT statements
c) To return the first n rows from a SELECT statement

P a g e 17 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


d) None of the above

39. What is the purpose of the EXCEPT operator in SQL?


a) To return the rows in the first SELECT statement that are not in the second
SELECT statement
b) To return all the rows from two SELECT statements
c) To return the first n rows from a SELECT statement
d) None of the above

40. What is data modeling in DBMS?


a) The process of designing the database schema
b) The process of converting data into information
c) The process of retrieving data from a database
d) The process of storing data in a database

UNIT 3 Relational Database Design

1. Which of the following is a data integrity rule?


a. Each table must have a primary key.
b. Each table must have at least one foreign key.
c. Each table must have a unique constraint.
d. All of the above.

2. Which of the following defines the relationship between two columns in a table?
a. Data integrity rule
b. Functional dependency
c. Normalization
d. Join dependency

3. In a table, a functional dependency between two columns means that:


a. One column determines the value of the other.
b. Both columns have the same value.
c. The values in both columns are unrelated.
d. The values in one column are dependent on the values in another column.

4. What is the purpose of normalization in database design?


a. To eliminate data redundancy.
b. To improve query performance.
c. To ensure data integrity.
d. All of the above.

5. Which normal form is achieved when a table is free from repeating groups?
a. First normal form
b. Second normal form
c. Third normal form
d. Boyce-Codd normal form

P a g e 18 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


6. Which of the following is a requirement for a table to be in second normal form?
a. It must be in first normal form.
b. It must have a composite primary key.
c. It must not have any non-key attributes dependent on only a portion of the
primary key.
d. All of the above.

7. A table is said to be in third normal form if:


a. It is in second normal form.
b. It has no transitive dependencies.
c. It has no partial dependencies.
d. All of the above.

8. Which of the following normal forms is sometimes referred to as "synthesis"?


a. First normal form
b. Second normal form
c. Third normal form
d. Boyce-Codd normal form

9. Which of the following normal forms is based on the concept of a multivalued


dependency?
a. First normal form
b. Second normal form
c. Third normal form
d. Fourth normal form

10. What is a multivalued dependency in a relational database?


a. A relationship between two tables.
b. A dependency between two columns in a table.
c. A dependency between two groups of columns in a table.
d. None of the above.

11. Which of the following normal forms is based on the concept of a join dependency?
a. Third normal form
b. Boyce-Codd normal form
c. Fourth normal form
d. Fifth normal form

12. A table is in fourth normal form if:


a. It is in third normal form.
b. It has no multivalued dependencies.
c. It has no join dependencies.
d. All of the above.

13. Which of the following is a requirement for a table to be in fifth normal form?
a. It must be in fourth normal form.
b. It must have a composite primary key.

P a g e 19 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


c. It must not have any non-key attributes dependent on only a portion of the
primary key.
d. It must not have any non-trivial join dependencies.

14. What is a pitfall of using a denormalized database design?


a. Poor query performance.
b. Data redundancy.
c. Data inconsistencies.
d. All of the above.

15. Which of the following is a reason for using a normalized database design?
a. To reduce data redundancy.
b. To improve query performance.
c. To ensure data integrity.
d. All of the above.

16. Which of the following is a requirement for a table to be in first normal form?
a. It must have a primary key.
b. It must not have repeating groups.
c. It must not have null values.
d. All of the above.

17. A functional dependency between two columns can be represented as:


a. A→B
b. A↔B
c. A∧B
d. A∨B

18. Which of the following is not a type of functional dependency?


a. Trivial
b. Partial
c. Transitive
d. Composite

19. Which of the following normal forms is based on the concept of a functional
dependency?
a. First normal form
b. Second normal form
c. Third normal form
d. Fourth normal form

20. Which of the following is a reason for using a denormalized database design?
a. To improve query performance.
b. To reduce data redundancy.
c. To ensure data integrity.
d. All of the above.

21. What is a transitive dependency in a relational database?


a. A relationship between two tables.

P a g e 20 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


b. A dependency between two columns in a table.
c. A dependency between two groups of columns in a table.
d. A dependency between three or more columns in a table.

22. Which of the following normal forms is based on the concept of a partial dependency?
a. First normal form
b. Second normal form
c. Third normal form
d. Fourth normal form

23. What is a partial dependency in a relational database?


a. A dependency between two tables.
b. A dependency between two columns in a table.
c. A dependency between two groups of columns in a table.
d. A dependency between only a portion of the primary key and a non-key attribute.

24. What is a join dependency in a relational database?


a. A relationship between two tables.
b. A dependency between two columns in a table.
c. A dependency between two groups of columns in a table.
d. A dependency between multiple tables.

25. Which of the following normal forms is based on the concept of a multivalued
dependency?
a. First normal form
b. Second normal form
c. Third normal form
d. Fourth normal form

26. Which of the following normal forms is also known as 3.5NF?


a. Fourth normal form
b. Fifth normal form
c. Sixth normal form
d. None of the above

27. What is a composite primary key?


a. A primary key made up of multiple columns.
b. A primary key made up of a single column.
c. A primary key that is also a foreign key.
d. A primary key that has null values.

28. What is a surrogate key?


a. A primary key made up of multiple columns.
b. A primary key made up of a single column.
c. A primary key that is also a foreign key.
d. A primary key that is assigned by the database management system.

29. Which of the following is a requirement for a table to be in second normal form?
a. It must have a composite primary key.

P a g e 21 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


b. It must not have any non-key attributes dependent on only a portion of the
primary key.
c. It must not have any repeating groups.
d. All of the above.

30. Which of the following is a requirement for a table to be in third normal form?
a. It must be in second normal form.
b. It must have no partial dependencies.
c. It must have no transitive dependencies.
d. All of the above.

31. What is data redundancy in a database?


a. The presence of duplicate data in a database.
b. The presence of outdated data in a database.
c. The presence of null values in a database.
d. The inability to retrieve data from a database.

32. What is a functional dependency in a relational database?


a. A relationship between two tables.
b. A dependency between two columns in a table.
c. A dependency between two groups of columns in a table.
d. A dependency between a primary key and a non-key attribute.

33. What is a non-key attribute in a relational database?


a. An attribute that is part of the primary key.
b. An attribute that is not part of the primary key.
c. An attribute that is used to join two tables.
d. An attribute that is always null.

34. What is the purpose of normalization in database design?


a. To eliminate data redundancy and improve data integrity.
b. To reduce the number of tables in a database.
c. To increase the performance of queries on a database.
d. To add more attributes to a database.

35. Which normal form is considered the highest level of normalization?


a. First normal form
b. Second normal form
c. Third normal form
d. Fifth normal form

36. Which normal form is based on the concept of a join dependency?


a. Fourth normal form
b. Fifth normal form
c. Sixth normal form
d. None of the above

37. What is a multivalued dependency in a relational database?


a. A relationship between two tables.

P a g e 22 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


b. A dependency between two columns in a table.
c. A dependency between two groups of columns in a table.
d. A dependency between two sets of columns in a table where one set is not
functionally dependent on the other.

38. What is the Boyce-Codd normal form?


a. A normal form that eliminates all anomalies from a database.
b. A normal form that is less strict than the third normal form.
c. A normal form that is based on the concept of a join dependency.
d. A normal form that is not commonly used in database design.

39. What is a pitfall in relational database design?


a. Over-normalization, which can lead to poor performance.
b. Under-normalization, which can lead to data redundancy and inconsistent data.
c. Poor naming conventions for tables and columns.
d. All of the above.

40. Which of the following is a benefit of using a normalized database design?


a. Improved data integrity and consistency.
b. Increased performance of queries on the database.
c. Reduced data redundancy.
d. All of the above.

UNIT 4 Database Transaction Processing

1. What is a transaction in a database?


a) A set of instructions that perform a specific task
b) A set of instructions that manipulate data in a database
c) A set of instructions that are executed as a single unit of work
d) A set of instructions that perform calculations on data in a database

2. What are the desirable properties of transactions in a database?


a) Atomicity, consistency, isolation, durability
b) Consistency, integrity, reliability, durability
c) Atomicity, reliability, isolation, durability
d) Atomicity, consistency, isolation, recovery

3. Which of the following properties of transactions ensures that a transaction is either


executed in its entirety or not at all?
a) Atomicity
b) Consistency
c) Isolation
P a g e 23 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


d) Durability

4. Which of the following is an example of a concurrent execution of two transactions


in a database?
a) T1: read(A), write(B); T2: read(A), write(B)
b) T1: read(A), write(A); T2: read(B), write(B)
c) T1: read(A), write(B); T2: read(B), write(A)
d) T1: read(A), write(B); T2: read(C), write(D)

5. What is a schedule in a database?


a) A sequence of instructions that can be executed concurrently
b) A sequence of instructions that must be executed sequentially
c) A sequence of instructions that cannot be executed concurrently
d) A sequence of instructions that manipulate data in a database

6. What is a serial schedule in a database?


a) A schedule in which transactions are executed concurrently
b) A schedule in which transactions are executed sequentially
c) A schedule in which transactions are executed randomly
d) A schedule in which transactions are executed periodically

7. Which of the following is an example of a serial schedule?


a) T1: read(A), write(B); T2: read(C), write(D)
b) T1: read(A), write(B); T2: read(B), write(C)
c) T1: read(A), write(B); T2: read(B), write(A)
d) T1: read(A), write(B); T2: read(D), write(C)

8. What is the serializability of a schedule in a database?


a) The property that a schedule can be transformed into a serial schedule
b) The property that a schedule is executed in a random order
c) The property that a schedule is executed concurrently
d) The property that a schedule cannot be transformed into a serial schedule

9. Which of the following schedules is serializable?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(A)

P a g e 24 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


b) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(C)
c) T1: read(A), write(B); T2: read(C), write(A); T3: read(D), write(C)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)

10. What is concurrency control in a database?


a) The process of ensuring that transactions are executed in a random order
b) The process of ensuring that transactions are executed sequentially
c) The process of ensuring that transactions are executed concurrently
d) The process of ensuring that transactions are executed in a serializable order

11. What is the purpose of concurrency control in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To increase the speed of transaction processing
d) To ensure that transactions are executed in a random order

12. Which of the following is an example of a conflict between concurrent transactions?


a) T1: read(A), write(B); T2: read(A), write(C)
b) T1: read(A), write(B); T2: read(B), write(C)
c) T1: read(A), write(B); T2: read(C), write(B)
d) T1: read(A), write(B); T2: read(D), write(E)

13. What is the purpose of locks in a database?


a) To prevent transactions from executing concurrently
b) To ensure that transactions are executed in a random order
c) To prevent conflicts between concurrent transactions
d) To increase the speed of transaction processing

14. Which of the following is an example of a shared lock in a database?


a) T1: read(A); T2: read(B); T3: read(C)
b) T1: read(A); T2: write(A); T3: read(A)
c) T1: write(A); T2: read(A); T3: read(A)
d) T1: read(A); T2: write(A); T3: write(A)

P a g e 25 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


15. Which of the following is an example of an exclusive lock in a database?
a) T1: read(A); T2: write(B); T3: read(C)
b) T1: read(A); T2: read(B); T3: write(C)
c) T1: write(A); T2: read(A); T3: read(A)
d) T1: read(A); T2: write(A); T3: write(A)

16. What is a deadlock in a database?


a) A situation in which two transactions are waiting for each other to release locks
b) A situation in which a transaction has acquired a lock and cannot release it
c) A situation in which a transaction is executed in a non-serializable order
d) A situation in which a transaction is executed concurrently with other transactions

17. What is the purpose of a transaction log in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To provide a record of all transactions that have been executed
d) To increase the speed of transaction processing

18. Which of the following is an example of a recoverable schedule?


a) T1: read(A), write(B); T2: read(C), write(D); T3: read(B), write(C)
b) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(C)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(B)

19. What is the purpose of checkpoints in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To increase the speed of transaction processing
d) To reduce the amount of work required during database recovery

20. Which of the following is an example of a dirty read in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(B)
c) T1: read(A), write(B); T2: read(B); T3: read(B), write(C)
d) T1: read(A), write(B); T2: read(C), write(B); T3: read(B)

P a g e 26 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


21. What is the purpose of a two-phase commit protocol in a distributed database?
a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To ensure that transactions are either all committed or all aborted
d) To increase the speed of transaction processing

22. Which of the following is an example of a read-only transaction in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), read(B); T2: read(C), read(D); T3: read(E), read(F)
c) T1: read(A), write(B); T2: read(C); T3: read(D)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(A)

23. What is the purpose of a write-ahead log in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To provide a record of all changes made to the database
d) To increase the speed of transaction processing

24. Which of the following is an example of a conflict-serializable schedule?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(C), write(B); T3: read(D), write(E)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(E)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(B)

25. Which of the following is an example of a non-recoverable schedule?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(A)
b) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), write(C)
d) T1: read(A), write(B); T2: read(B), write(A); T3: read(C), write(D)

26. What is the purpose of a deadlock detection algorithm in a database?


a) To prevent conflicts between concurrent transactions
b) To ensure that transactions are executed in a serializable order

P a g e 27 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


c) To identify and resolve deadlocks between transactions
d) To increase the speed of transaction processing

27. Which of the following is an example of a phantom read in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(B); T3: read(B)
c) T1: read(A), write(B); T2: read(B); T3: read(A), read(B)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), read(D)

28. What is the purpose of a recovery manager in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To restore the database to a consistent state after a failure
d) To increase the speed of transaction processing

29. Which of the following is an example of a cascadeless schedule in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), write(C)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(B)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(E)

30. Which of the following is an example of a lost update problem in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(A)
b) T1: read(A), write(B); T2: read(B), write(A); T3: read(C), write(D)
c) T1: read(A), write(B); T2: read(A), write(C); T3: read(A), write(D)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(B)

31. What is the purpose of a concurrency control mechanism in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To increase the speed of transaction processing
d) To reduce the amount of work required during database recovery

P a g e 28 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


32. Which of the following is an example of a repeatable read schedule in a database?
a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(B); T3: read(B)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), read(C)
d) T1: read(A), write(B); T2: read(B), write(A); T3: read(C), write(D)

33. What is the purpose of a lock manager in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To increase the speed of transaction processing
d) To ensure that transactions are either all committed or all aborted

34. Which of the following is an example of a phantom problem in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), read(B)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(B)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(E)

35. What is the purpose of a transaction log in a database?


a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To increase the speed of transaction processing
d) To aid in database recovery after a failure

36. Which of the following is an example of a dirty read in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(B); T3: read(B), write(C)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), read(C)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(B)

37. Which of the following is an example of a non-serializable schedule in a database?


a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(A)
b) T1: read(A), write(B); T2: read(B), write(A); T3: read(C), write(D)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(B)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(E)

P a g e 29 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


38. What is the purpose of a write-ahead log in a database?
a) To ensure that transactions are executed in a serializable order
b) To prevent conflicts between concurrent transactions
c) To increase the speed of transaction processing
d) To ensure that changes to the database are recorded before they are written to
disk

39. Which of the following is an example of a schedule that is not recoverable in a


database?
a) T1: read(A), write(B); T2: read(B), write(C); T3: read(C), write(D)
b) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), write(D)
c) T1: read(A), write(B); T2: read(B), write(C); T3: read(D), write(B)
d) T1: read(A), write(B); T2: read(B), write(C); T3: read(A), write(C), write(D)

40. Which of the following is not a desirable property of transactions in a database?


a) Atomicity
b) Consistency
c) Durability
d) Inconsistency

UNIT 5 Programming constructs in Database

1. Which of the following is not a flow control statement in programming?


a) if-else
b) switch-case
c) for loop
d) stored procedure

2. What is the purpose of a function in programming?


a) To perform a specific task and return a value
b) To store and retrieve data from a database
c) To update records in a database
d) To control flow of execution within a program

P a g e 30 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


3. Which of the following is true about stored procedures?
a) They are used to execute a set of SQL statements in a specific order
b) They are used to create tables and other database objects
c) They are used to define the structure of a database
d) They are used to create triggers in a database

4. What is a cursor in database programming?


a) A control structure used to iterate through a set of data in a database
b) A function used to calculate values in a database
c) A statement used to update data in a database
d) A data type used to store a set of related values in a database

5. What is the purpose of a trigger in database programming?


a) To perform an action in response to a change in a database table
b) To store and retrieve data from a database
c) To update records in a database
d) To control flow of execution within a program

6. Which of the following is not a type of exception in programming?


a) Arithmetic exception
b) Input/Output exception
c) Database exception
d) Null pointer exception

7. Which of the following flow control statements is used to iterate over a collection of
elements in programming?
a) if-else
b) switch-case
c) for loop
d) while loop

8. Which of the following is an advantage of using functions in programming?


a) They can be reused in different parts of a program

P a g e 31 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


b) They can update records in a database
c) They can define the structure of a database
d) They can create triggers in a database

9. What is the purpose of a stored procedure in database programming?


a) To execute a set of SQL statements in a specific order
b) To create tables and other database objects
c) To define the structure of a database
d) To create triggers in a database

10. What is the purpose of a cursor in database programming?


a) To iterate over a set of data in a database
b) To calculate values in a database
c) To update data in a database
d) To store a set of related values in a database

11. What is the purpose of a trigger in database programming?


a) To perform an action in response to a change in a database table
b) To store and retrieve data from a database
c) To update records in a database
d) To control flow of execution within a program

12. Which of the following is an example of a flow control statement in programming?


a) SELECT statement
b) INSERT statement
c) if-else statement
d) JOIN statement

13. Which of the following is an advantage of using stored procedures in database


programming?
a) They can improve performance by reducing network traffic
b) They can define the structure of a database
c) They can create tables and other database objects
d) They can be used to define triggers in a database

P a g e 32 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


14. Which of the following is not a type of cursor in database programming?
a) Static cursor
b) Dynamic cursor
c) Forward-only cursor
d) Stored cursor

15. What is the purpose of exception handling in programming?


a) To handle errors and unexpected events in a program
b) To control flow of execution within a program
c) To store and retrieve data from a database
d) To update records in a database

16. Which of the following flow control statements is used to execute a block of code
repeatedly in programming?
a) if-else statement
b) switch-case statement
c) for loop
d) while loop

17. What is the purpose of a function in database programming?


a) To perform a specific task and return a value
b) To create tables and other database objects
c) To define the structure of a database
d) To create triggers in a database

18. Which of the following is a disadvantage of using triggers in database


programming?
a) They can decrease performance by increasing database overhead
b) They can be used to define the structure of a database
c) They can create tables and other database objects
d) They can be difficult to debug and maintain

P a g e 33 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


19. Which of the following is not a desirable property of exception handling in
programming?
a) Robustness
b) Portability
c) Reliability
d) Inefficiency

20. Which of the following is a commonly used flow control statement in programming?
a) CREATE statement
b) UPDATE statement
c) if-else statement
d) ALTER statement

21. Which of the following is true about stored procedures?


a) They are used to execute a set of SQL statements in a specific order
b) They are used to create tables and other database objects
c) They are used to define the structure of a database
d) They are used to create triggers in a database

22. What is a cursor in database programming?


a) A control structure used to iterate through a set of data in a database
b) A function used to calculate values in a database
c) A statement used to update data in a database
d) A data type used to store a set of related values in a database

23. What is the purpose of a trigger in database programming?


a) To perform an action in response to a change in a database table
b) To store and retrieve data from a database
c) To update records in a database
d) To control flow of execution within a program

24. Which of the following is not a type of exception in programming?


a) Arithmetic exception
b) Input/Output exception
c) Database exception

P a g e 34 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


d) Syntax exception

25. Which of the following flow control statements is used to exit a loop in
programming?
a) if-else statement
b) switch-case statement
c) break statement
d) continue statement

26. What is the purpose of a function in database programming?


a) To perform a specific task and return a value
b) To store and retrieve data from a database
c) To update records in a database
d) To control flow of execution within a program

27. Which of the following is a commonly used flow control statement in programming?
a) ALTER statement
b) SELECT statement
c) DELETE statement
d) for loop

28. What is the purpose of a stored procedure in database programming?


a) To execute a set of SQL statements in a specific order
b) To create tables and other database objects
c) To define the structure of a database
d) To create triggers in a database

29. Which of the following is a disadvantage of using functions in database


programming?
a) They can decrease performance by increasing database overhead
b) They can be difficult to debug and maintain
c) They can create tables and other database objects
d) They cannot be reused in different parts of the same program

P a g e 35 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


30. Which of the following is not a desirable property of stored procedures in database
programming?
a) Security
b) Performance
c) Maintainability
d) Scalability

31. What is a trigger in database programming?


a) A set of SQL statements that are executed in response to a database event
b) A type of data structure used to store information in a database
c) A function used to calculate values in a database
d) A control structure used to iterate through a set of data in a database

32. Which of the following is true about cursors in database programming?


a) They are used to iterate through a set of data in a database
b) They are used to define the structure of a database
c) They are used to create triggers in a database
d) They are used to store and retrieve data from a database

33. Which of the following flow control statements is used to execute one of several
blocks of code in programming?
a) if-else statement
b) switch-case statement
c) for loop
d) while loop

34. Which of the following is not a desirable property of functions in database


programming?
a) Efficiency
b) Reusability
c) Maintainability
d) Complexity

35. Which of the following is not a commonly used programming construct in database
programming?

P a g e 36 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


a) Flow control statements
b) Functions
c) Stored procedures
d) DDL statements

36. Which of the following is not a desirable property of triggers in database


programming?
a) Flexibility
b) Maintainability
c) Robustness
d) Efficiency

37. What is the purpose of exception handling in programming?


a) To handle errors and unexpected events in a program
b) To create tables and other database objects
c) To update records in a database
d) To store and retrieve data from a database

38. Which of the following flow control statements is used to continue to the next
iteration of a loop in programming?
a) if-else statement
b) switch-case statement
c) break statement
d) continue statement

39. Which of the following is not a commonly used flow control statement in
programming?
a) if-else statement
b) switch-case statement
c) CREATE statement
d) while loop

40. Which of the following is a commonly used programming construct in database


programming for controlling access to data?
a) Flow control statements

P a g e 37 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


b) Functions
c) Stored procedures
d) Concurrency control mechanisms

UNIT 6 File Organization and Trends in Database

1. What is file organization in databases?


a) It refers to the process of storing data in a database
b) It refers to the structure used to store data in a database file
c) It refers to the process of accessing data in a database
d) It refers to the process of sorting data in a database

2. What are the types of file organizations used in databases?


a) Sequential, indexed, hashed
b) Sequential, sorted, hashed
c) Indexed, sorted, clustered
d) Sequential, indexed, clustered

3. What is an index in databases?


a) A database object used to organize data for faster retrieval
b) A data structure used to store data in a database
c) A type of file organization used in databases
d) A programming construct used to manipulate data in a database

4. What are the types of indexing used in databases?


a) B-tree, hash, binary
b) Sequential, binary, clustered
c) B-tree, hash, clustered
d) Sequential, hash, binary

5. What is hashing in databases?


a) A technique used to store data in a database
b) A technique used to access data in a database
c) A technique used to index data in a database
P a g e 38 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


d) A technique used to sort data in a database

6. What are the techniques used for hashing in databases?


a) Linear, quadratic, chained
b) Linear, binary, clustered
c) Quadratic, binary, sorted
d) Linear, quadratic, sorted

7. What is big data in databases?


a) A term used to describe large amounts of data that cannot be processed by
traditional methods
b) A type of database used for storing and processing large amounts of data
c) A type of file organization used in databases
d) A technique used for accessing data in a database

8. What are NoSQL systems in databases?


a) Databases that do not use SQL for querying data
b) Databases that use SQL for querying data
c) Databases that are optimized for relational data
d) Databases that are optimized for transaction processing

9. What is sequential file organization in databases?


a) Data is stored in the order it is inserted into the database
b) Data is stored in a sequence that is determined by a key field
c) Data is stored in a sequence that is determined by the size of the data
d) Data is stored in a sequence that is determined by the data type

10. What is indexed file organization in databases?


a) Data is stored in a sequence that is determined by a key field
b) Data is stored in the order it is inserted into the database
c) Data is stored in a sequence that is determined by the size of the data
d) Data is stored in a sequence that is determined by the data type

P a g e 39 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


11. What is hashed file organization in databases?
a) Data is stored in a sequence that is determined by the size of the data
b) Data is stored in a sequence that is determined by the data type
c) Data is stored in a sequence that is determined by a key field
d) Data is stored in a random sequence

12. What is a B-tree index in databases?


a) An indexing technique used for faster retrieval of data
b) A file organization used for storing data
c) A hashing technique used for indexing data
d) A programming construct used for manipulating data

13. What is a hash index in databases?


a) An indexing technique used for faster retrieval of data
b) A file organization used for storing data
c) A hashing technique used for indexing data
d) A programming construct used for manipulating data

14. What is a clustered index in databases?


a) An index that is based on the physical order of data in a table
b) An index that is based on the logical order of data in a table
c) An index that is used to speed up sorting of data in a table
d) An index that is used to speed up searching for data in a table

15. What is a non-clustered index in databases?


a) An index that is based on the physical order of data in a table
b) An index that is based on the logical order of data in a table
c) An index that is used to speed up sorting of data in a table
d) An index that is used to speed up searching for data in a table

16. What is a function in databases?


a) A programming construct used to manipulate data in a database
b) A database object used to organize data for faster retrieval
c) A stored procedure used for data analysis
d) A programming construct used to perform a specific task

P a g e 40 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


17. What are stored procedures in databases?
a) A type of function used for data analysis
b) A type of programming construct used for data manipulation
c) A type of programming construct used to perform a specific task
d) A database object used to organize data for faster retrieval

18. What are cursors in databases?


a) A database object used to organize data for faster retrieval
b) A programming construct used to manipulate data in a database
c) A stored procedure used for data analysis
d) A mechanism for traversing through data in a database

19. What are triggers in databases?


a) Database objects that execute a set of actions in response to an event
b) A programming construct used to manipulate data in a database
c) A stored procedure used for data analysis
d) A mechanism for traversing through data in a database

20. What is exception handling in databases?


a) A mechanism for handling errors in a database
b) A mechanism for handling transactions in a database
c) A programming construct used to manipulate data in a database
d) A mechanism for organizing data in a database

21. What are the desirable properties of transactions in databases?


a) Atomicity, consistency, isolation, durability
b) Atomicity, consistency, concurrency, durability
c) Atomicity, integrity, isolation, durability
d) Atomicity, consistency, integrity, durability

22. What is atomicity in database transactions?


a) It ensures that a transaction is either completed in its entirety or not at all
b) It ensures that transactions are executed in a particular order

P a g e 41 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


c) It ensures that transactions are executed concurrently
d) It ensures that transactions are executed in a consistent manner

23. What is consistency in database transactions?


a) It ensures that a transaction leaves the database in a valid state
b) It ensures that transactions are executed in a particular order
c) It ensures that transactions are executed concurrently
d) It ensures that transactions are executed in a consistent manner

24. What is isolation in database transactions?


a) It ensures that a transaction is isolated from other transactions until it is
completed
b) It ensures that transactions are executed in a particular order
c) It ensures that transactions are executed concurrently
d) It ensures that transactions are executed in a consistent manner

25. What is durability in database transactions?


a) It ensures that the effects of a transaction persist even in the event of a failure
b) It ensures that transactions are executed in a particular order
c) It ensures that transactions are executed concurrently
d) It ensures that transactions are executed in a consistent manner

26. What is a schedule in database transactions?


a) A sequence of instructions that represent a series of transactions
b) A list of operations that the database management system performs on behalf of
the user
c) A set of rules that dictate the order in which transactions are executed
d) A mechanism used to ensure that transactions are executed in a consistent
manner

27. What is serializability in database transactions?


a) A property that guarantees that a set of concurrent transactions will produce the
same results as if they were executed serially
b) A mechanism used to ensure that transactions are executed in a consistent
manner

P a g e 42 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


c) A set of rules that dictate the order in which transactions are executed
d) A mechanism used to ensure that transactions are isolated from one another

28. What is concurrency control in databases?


a) The process of managing the simultaneous execution of multiple transactions in
a database
b) The process of managing the physical storage of data in a database
c) The process of managing the logical organization of data in a database
d) The process of managing the security of data in a database

29. What is recoverability in databases?


a) The ability to restore the database to a consistent state after a failure
b) The ability to perform backups of the database
c) The ability to recover data that has been accidentally deleted
d) The ability to recover data that has been corrupted or lost due to a hardware
failure

30. What is a file organization in databases?


a) A method used to store data in a database
b) A mechanism used to protect data in a database
c) A set of rules that dictate the order in which transactions are executed
d) A process used to optimize the performance of a database

31. What are the different types of file organizations used in databases?
a) Sequential, indexed sequential, random
b) Sequential, indexed, hash
c) Sequential, random, binary
d) Sequential, indexed sequential, binary

32. What is indexing in databases?


a) A mechanism used to speed up data retrieval from a database
b) A mechanism used to protect data in a database
c) A mechanism used to organize data in a database
d) A mechanism used to optimize the performance of a database

P a g e 43 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


33. What are the different types of indexing used in databases?
a) Clustered, non-clustered, hash
b) Clustered, non-clustered, binary
c) Clustered, indexed sequential, random
d) Clustered, non-clustered, sequential

34. What is hashing in databases?


a) A technique used to quickly locate data in a database
b) A technique used to protect data in a database
c) A technique used to organize data in a database
d) A technique used to optimize the performance of a database

35. What are the different hashing techniques used in databases?


a) Linear hashing, quadratic hashing, double hashing
b) Linear hashing, binary hashing, random hashing
c) Linear hashing, indexed hashing, sequential hashing
d) Linear hashing, binary hashing, sequential hashing

36. What is big data?


a) A term used to describe large and complex datasets
b) A term used to describe the process of analyzing data
c) A term used to describe the storage of data in a database
d) A term used to describe the organization of data in a database

37. What are NoSQL systems?


a) A type of database management system that is designed to handle unstructured
and semi-structured data
b) A type of database management system that is designed to handle only
structured data
c) A type of database management system that is designed to handle only semi-
structured data
d) A type of database management system that is designed to handle only
unstructured data

P a g e 44 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME


38. What are the advantages of using NoSQL systems?
a) They are highly scalable and can handle large amounts of data
b) They are more flexible than traditional relational databases
c) They can handle different types of data, including unstructured and semi-
structured data
d) All of the above

39. What are the disadvantages of using NoSQL systems?


a) They may not provide the same level of data consistency and reliability as
traditional relational databases
b) They may require more expertise and specialized knowledge to set up and
maintain
c) They may not support advanced querying capabilities
d) All of the above

40. What is exception handling in database programming?


a) A mechanism used to handle errors and exceptions that occur during program
execution
b) A mechanism used to optimize the performance of database programs
c) A mechanism used to improve the security of database programs
d) A mechanism used to organize and manage data in a database

P a g e 45 | 45

STUDYBOOSTERS – ELEVATE YOUR EXAM GAME

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