Logo

Advanced-rdbms-concepts Questions Set 3:

Quiz Mode

The join operations that do not retain mismatched tuples are called _________ joins.

1
2
3
4

Solution:

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

1
2
3
4

Solution:

Consider the relation scheme R = {E, F, G, H, I, J, K, L, M, M} and the set of functional dependencies {{E, F} -> {G}, {F} -> {I, J}, {E, H} -> {K, L}, K -> {M}, L -> {N} on R. What is the key for R?

1
2
3
4

Solution:

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

read(x); x := x – 50; write(x); read(y); y := y + 50; write(y)

The constraint that the sum of the accounts x and y should remain constant is that of

1
2
3
4

Solution:

What is a foreign key?

1
2
3
4

Solution:

Let S be the following schedule of operations of three transactions T1, T2 and T3 in a relational database system:

R2(Y), R1(X), R3(Z), R1(Y), W1(X), R2(Z), W2(Y), R3(X), W3(Z)

Consider the statements P and Q below :

P : S is conflict serializable

Q : If T3 commits before T1 finishes, then S is recoverable

1
2
3
4

Solution:

Let ri(z) and wi(z) denote read and write operations respectively on a data item z by a transaction Ti. Consider the following two schedules.

S1: r1(x)r1(y)r2(x)r2(y)w2(y)w1(x) S2: r1(x)r2(x)r2(y)w2(y)r1(y)w1(x)

Which one of the following options is correct?

1
2
3
4

Solution:

Consider the following relation

Cinema (theater, address, capacity)

Which of the following options will be needed at the end of the SQL query

SELECT P1. address FROM Cinema P1

Such that it always finds the addresses of theaters with maximum capacity?

1
2
3
4

Solution:

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?

1
2
3
4

Solution:

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?

1
2
3
4

Solution: