Explore topic-wise MCQs in Database.

This section includes 125 Mcqs, each offering curated multiple-choice questions to sharpen your Database knowledge and support exam preparation. Choose a topic below to get started.

101.

Consider a simple checkpointing protocol and the following set of operations in the log.

A. Undo: T3, T1; Redo: T2
B. Undo: T3, T1; Redo: T2, T4
C. Undo: none; Redo; T2, T4, T3, T1
D. Undo: T3, T1, T4; Redo: T2
Answer» B. Undo: T3, T1; Redo: T2, T4
102.

Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock ?

A. 1 only
B. 2 only
C. Both 1 and 2
D. Neither 1 nor 2
Answer» C. Both 1 and 2
103.

Given the following relation instance

A. XY Z and Z Y
B. YZ X and Y Z
C. YZ X and X Z
D. XZ Y and Y X
Answer» C. YZ X and X Z
104.

Consider a file of 16384 records. Each record is 32 byte long and its key field is of size 6 byte. The file is ordered on a nonkey field, and the file organization is unspanned. The file is stored in a file system with block size 1024 byte, and the size of a block pointer is 10 byte. If the secondary index is built on a key field of the file, and a multi-level index scheme is used to store the secondary index, the number of first-level and second-level blocks in the multi-level index are respectively

A. 8 and 0
B. 128 and 6
C. 256 and 4
D. 512 and 5
Answer» D. 512 and 5
105.

The order of an internal node in a B

A. 24
B. 25
C. 26
D. 27
Answer» D. 27
106.

Consider the following transactions with data items P and Q initialized to zero :

A. a serializable schedule
B. a schedule that is not conflict serializable
C. a conflict serializable schedule
D. a schedule for which a precedence graph cannot be drawn
Answer» C. a conflict serializable schedule
107.

Consider a schema R(A, B, C, D) and functional dependencies A B and C D. Then the decomposition of R into R1 (AB) and R2 (CD) is

A. dependency preserving and lossless join
B. lossless join but not dependency preserving
C. dependency preserving but not lossless join
D. not dependency preserving and not lossless join
Answer» D. not dependency preserving and not lossless join
108.

Consider the following transaction involving two bank accounts x and y.

A. Atomicity
B. Consistency
C. Isolation
D. Durability
Answer» C. Isolation
109.

Consider the following database schedule with two transactions, T

A. S is non-recoverable
B. S is recoverable, but has a cascading abort
C. S does not have a cascading abort
D. S is strict
Answer» D. S is strict
110.

Consider the relation Student (Name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one boy and one girl. What does the following relational algebra expression produce?

A. names of girl students with the highest marks
B. names of girl students with more marks than some boy student
C. names of girl students with marks not less than some boy student
D. names of girl students with more marks than all the boy students
Answer» E.
111.

Consider the following relational schema pertaining to a student s database:

A. 8, 8
B. 120, 8
C. 960, 8
D. 960, 120
Answer» B. 120, 8
112.

Let r be a rational instance with schema R = (A, B, C, D). We define r

A. s r
B. r s = r
C. r s
D. r * s = s
Answer» D. r * s = s
113.

The following key values are inserted into a B

A. 32
B. 3
C. 4
D. 5
Answer» B. 3
114.

Suppose a database schedule S involves transactions T

A. Topological order
B. Depth-first order
C. Breadth-first order
D. Ascending order of transaction indices
Answer» B. Depth-first order
115.

Two transactions T

A. 27
B. 23
C. 54
D. 45
Answer» D. 45
116.

Consider the following database table named top_scorer.

A. 21
B. 7
C. 0
D. 3
Answer» C. 0
117.

In SQL, relations can contain null values, and comparisons with a null values are treated as unknown. Suppose all comparisons with a null value are treated as false. Which of the following pairs is not equivalent?

A. x = 5 not (not (x = 5)
B. x = 5 x > 4 and x < 6, where x is an integer
C. x 5 not (x = 5)
D. None of the above
Answer» D. None of the above
118.

Given the following two statements:

A. S1 is TRUE and S2 is FALSE.
B. Both S1 and S2 are TRUE.
C. S1 is FALSE and S2 is TRUE.
D. Both S1 and S2 are FALSE.
Answer» B. Both S1 and S2 are TRUE.
119.

Consider a bank database with only one relation transaction (transno, acctno, data, amount) The amount attribute value is positive for deposits and negative for withdrawals.

A. Only a
B. only b
C. Both a and b
D. None of the above
Answer» B. only b
120.

A database of research articles in a journal uses the following schema.

A. 1NF
B. 2NF
C. 3NF
D. BCNF
Answer» C. 3NF
121.

Consider a relational table with a single record for each registered student with the following attributes:

A. Bank Account_Number is a candidate key
B. Registration Account_Number can be primary key
C. UID is a candidate key if all students are from the same country
D. If S is a superkey such that S UID is NULL then S UID is also a super key
Answer» B. Registration Account_Number can be primary key
122.

Consider a database that has the relation schemas EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, DeptId). Note that the DeptId can be permitted to be NULL in the relation EMP. Consider the following queries on the database expressed in tuple relational calculus.

A. (I) and (II) only
B. (I) and (III) only
C. (II) and (III) only
D. (I), (II) and (III)
Answer» E.
123.

Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation. employee (empId, empName, empAge) dependent(depId, eId, depName, depAge) Consider the following relational algebra query :

A. some dependent.
B. all dependents.
C. some of his/her dependents.
D. all of his/her dependents.
Answer» E.
124.

The maximum number of superkeys for the relation schema R(E, F, G, H) with E as the key is _____.

A. 64
B. 36
C. 8
D. 24
Answer» D. 24
125.

Consider an Entity-Relationship(ER) model in which entity sets E

A. 21
B. 5
C. 7
D. 0
Answer» C. 7