DBMS GATE CS and IT previous year questions with answer


Ques 11 Gate 2017 Set-2


An ER model of a database consists of entity types A and B. These are connected by a relationship R which does not have its own attribute. Under which of the following conditions, can the relational table for R be merged with that of A?

(A) Relation R is one-to-many and the participation of A in R is total.
(B) Relation R is one-to-many and the participation of A in R is partial.
(C) Relation R is many-to-one and the participation of A in R is total.
(D) Relation R is many-to-one and the participation of A in R is partial.

A

A

B

B

C

C

D

D



Ques 12 Gate 2017 Set-1


In a database system, unique time stamps are assigned to each transaction using Lamport’s logical clock. Let TS(T1) and TS(T2) be the time stamps of transactions T1 and T2 respectively. Besides, T1 holds a lock on the resource R, and T2 has requested a conflicting lock on the same resource R. The following algorithm is used to prevent deadlocks in the database assuming that a killed transaction is restarted with the same timestamp.

if TS(T2) <TS(T1) then
    T1 is killed
else
    T2 waits.
.
.
Assume any transactions that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks?

A

The database system is both deadlock-free and starvation- free.

B

The database system is deadlock- free, but not starvation-free.

C

The database system is starvation-free but not deadlock- free.

D

The database system is neither deadlock- free nor starvation-free.



Ques 13 Gate 2017 Set-1


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

I. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∀ v ∈ DEPT (t[DeptId] ≠ DeptId]))}
II. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∃ v ∈ DEPT (t[DeptId] ≠ DeptId]))}
III. {t | ∃ u ∈ EMP (t[EMPName] = u[EmpName] ∧ ∃ v ∈ DEPT (t[DeptId] = DeptId]))}

A

I and II only

B

I and III only

C

II and III only

D

I, II, and III



Ques 14 Gate 2017 Set-1


The following functional dependencies hold true for the relational schema R{V, W, X, Y, Z}:

V→W
VW→X
Y→VX
Y→Z

Which of the following is irreducible equivalent for this set of functional dependencies?

A

V→W
V→X
Y→V
Y→Z

B

V→W
W→X
Y→V
Y→Z

C

V→W
V→X
Y→V
Y→X
Y→Z

D

V→W
W→X
Y→V
Y→X
Y→Z



Ques 15 Gate 2016 Set-2


Consider the following database schedule with two transactions, T1 and T2.

S = r2(X); r1(X); r2(Y); w1(X); r1(Y); w2(X); a1; a2;

where ri(Z) denotes a read operation by transaction Ti on a variable Z, wi(Z) denotes a write operation by Ti on a variable Z and ai denotes an abort by transaction Ti . Which one of the following statements about the above schedule is TRUE?

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



Ques 16 Gate 2016 Set-2


Suppose a database schedule S involves transactions T1, ....Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?

A

Topological order

B

Depth-first order

C

Breadth-first order

D

Ascending order of transaction indices



Ques 17 Gate 2016 Set-1


Consider the following two phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects {O1,...,Ok}. This is done in the following manner:

Step 1. T acquires exclusive locks to O1,...,Ok in increasing order of their addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.

This protocol will

A

guarantee serializability and deadlock-freedom

B

guarantee neither serializability nor deadlock-freedom

C

guarantee serializability but not deadlock-freedom

D

guarantee deadlock-freedom but not serializability



Ques 18 Gate 2016 Set-1


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

(VOLUME, NUMBER, STARTPGE, ENDPAGE, TITLE, YEAR, PRICE)

The primary key is (VOLUME, NUMBER, STARTPAGE, ENDPAGE) and the following functional dependencies exist in the schema.

(VOLUME, NUMBER, STARTPAGE, ENDPAGE) -> TITLE
(VOLUME, NUMBER) -> YEAR
(VOLUME, NUMBER, STARTPAGE, ENDPAGE) -> PRICE

The database is redesigned to use the following schemas.

(VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, PRICE)
(VOLUME, NUMBER, YEAR)

Which is the weakest normal form that the new database satisfies, but the old one does not?

A

1NF

B

2NF

C

3NF

D

BCNF



Ques 19 Gate 2016 Set-1


Which one of the following is NOT a part of the ACID properties of database transactions?

A

Atomicity

B

Consistency

C

Isolation

D

Deadlock-freedom



Ques 20 Gate 2016 Set-1


Which of the following is NOT a superkey in a relational schema with attributes V, W, X, Y, Z and primary key V Y ?

A

V X Y Z

B

V W X Z

C

V W X Y

D

V W X Y Z