Logo

Advanced-rdbms-concepts Questions Set 6:

Quiz Mode

An attribute is a __________ in a relation.

1
2
3
4

Solution:

Which symbol is used to represent a relationship in an Entity-Relationship (E-R) diagram in database management systems (DBMS)?

1
2
3
4

Solution:

Consider the relation X(P, Q, R, S, T, U) with the following set of functional dependencies

F = { {P, R} → {S,T}, {P, S, U} → {Q, R} }

Which of the following is the trivial functional dependency in F+ is closure of F?

1
2
3
4

Solution:

Let Ri(z) and Wi(z) denote read and write operations on a data element z by a transaction Ti , respectively. Consider the schedule S with four transactions.

S : R4(z), R2(x), R3(x), R1(y), W1(y), W2(x), W3(y), R4(x)

Which one of the following serial schedules is conflict equivalent to S? 

1
2
3
4

Solution:

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?

1
2
3
4

Solution:

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

(start, T4); (write, T4, y, 2, 3); (start, T1); (commit, T4); (write, T1, z, 5, 7); (checkpoint); (start, T2); (write, T2, x, 1, 9); (commit, T2); (start, T3); (write, T3, z, 7, 2);

If a crash happens now and the system tries to recover using both undo and redo operations, what are the contents of the undo list and the redo list

1
2
3
4

Solution:

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]))} 

1
2
3
4

Solution:

Consider the relation R(P,Q,S,T,X,Y,Z,W) with the following functional dependencies.

PQ -> X; P -> YX; Q -> Y; Y -> ZW

Consider the decomposition of the relation R into the constituent relations according to the following two decomposition schemes.

D1 : R = [(P,Q,S,T); (P,T,X); (Q,Y); (Y,Z,W)] D2 : R = [(P,Q,S); (T,X); (Q,Y); (Y,Z,W)]

Which one of the following options is correct?

1
2
3
4

Solution:

Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read operation on data item P is denoted by read(P) and the write operation on data item P is denoted by write(P).

 

Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?

1
2
3
4

Solution:

Consider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed, The underlined attributes are the respective primary keys.

  • Schema I: Registration(rollno, courses) Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for. Non-trivial functional dependency rollno → courses
  • Schema II: Registration (rollno, coursid, email) Non-trivial functional dependencies: rollno, courseid → email email → rollno
  • Schema III: Registration (rollno, courseid, marks, grade) Non-trivial functional dependencies: rollno, courseid, → marks, grade marks → grade
  • Schema IV: Registration (rollno, courseid, credit) Non-trivial functional dependencies: rollno, courseid → credit courseid → credit

Which one of the relational schemas above is in 3NF but not in BCNF?

1
2
3
4

Solution: