How to practice Databases

Use small tables and explicit dependency sets to reason about SQL, normalization and transactions.

Attempt a question, record the concept and assumptions, then check the available answer. Rework mistakes after revising the relevant concepts. Topic tags can overlap; review the question context.

Questions 1–10 of 73. Imported answers require independent review unless marked reviewed.

Topic practice 73 questionsPage 1 of 8

Question 15

Open question
CS2MCQ1 markNeeds review
In the context of DBMS, consider the two sets T and S given below.
T | S I: Logical schema | L: Views II: Physical schema | M: File organization and indexes III: External schema | N: Relations
Which one of the following is the correct match from T to S?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 20

Open question
CS2MCQ1 markNeeds review
Consider concurrent execution of two transactions

and

in a DBMS, both of which access a data object

. For these two transactions to not conflict on

, which one of the following statements must be true?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 30

Open question
CSMSQ1 markNeeds review
Let

,

,

and

be the attributes of a relation in a relational schema. Let

indicate functional dependency in the context of a relational database, where

.
Which of the following options is/are always true?
Your answerSelect all correct options. You can choose more than one.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 31

Open question
CSMSQ1 markNeeds review
In the context of relational database normalization, which of the following statements is/are true?
Your answerSelect all correct options. You can choose more than one.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 42

Open question
CS2MCQ2 marksNeeds review
In the context of schema normalization in relational DBMS, consider a set

of functional dependencies. The set of all functional dependencies implied by

is called the closure of

. To compute the closure of

, Armstrong’s axioms can be applied. Consider

,

, and

as sets of attributes over a relational schema. The three rules of Armstrong’s Axioms are described as follows.
Reflexivity: If

, then

Augmentation: If

, then

for any

Transitivity: If

and

, then

The additional rule of Union is defined as follows.
Union: If

and

, then

It can be proved that the additional rule of Union is also implied by the three rules of Armstrong’s Axioms. Listed below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 43

Open question
CSMCQ2 marksNeeds review
Consider a relational database schema with two relations

and

. Let

be a tuple relational calculus expression. Which one of the following relational algebraic expressions is equivalent to

?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 46

Open question
CS2MCQ2 marksNeeds review
An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.
S1: A hash index must be a dense index
S2: A

tree index can be a sparse index
Which one of the following options is correct?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 65

Open question
CSNAT2 marksNeeds review
Consider a relational database schema with a relation

. If

and

are the only two candidate keys of the relation

, then the number of superkeys of relation

is _____. (answer in integer)

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 15

Open question
CSMCQ1 markNeeds review
A schedule of three database transactions

,

, and

is shown.

and

denote read and write of data item

by transaction

,

. The transaction

aborts at the end. Which other transaction(s) will be required to be rolled back?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 21

Open question
CSMSQ1 markNeeds review
Consider the following

tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the

tree. Which of the following option(s) is/are CORRECT?
Tree diagram: root keys 6, 12, 19; four leaf nodes contain, respectively, 1, 4, 3; 7, 9, 10; 13, 15, 17; and 20, 21, 22.
Diagram for Computer Science and Information Technology question 21

Your answerSelect all correct options. You can choose more than one.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer