Question

Let the set of functional dependencies F={QR→S,R→P,S→Q}F = \{QR \to S, R \to P, S \to Q\} hold on a relation schema X=(PQRS)X = (PQRS). XX is not in BCNF. Suppose XX is decomposed into two schemas YY and ZZ, where Y=(PR)Y = (PR) and Z=(QRS)Z = (QRS).

Consider the two statements given below.

I. Both YY and ZZ are in BCNF
II. Decomposition of XX into YY and ZZ is dependency preserving and lossless

Which of the above statements is/are correct?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2019 answer key

Solution

Test the decomposition for BCNF, lossless join, and dependency preservation.

Given schema X=(PQRS)X = (PQRS) and F={QR→S,R→P,S→Q}F = \{QR \to S, R \to P, S \to Q\}.
Candidate keys of XX:

  • (QR)+=QRSP=PQRS  ⟹  QR(QR)^+ = QRSP = PQRS \implies QR is a candidate key.
  • Since S→QS \to Q, (SR)+=SRQP=PQRS  ⟹  SR(SR)^+ = SRQP = PQRS \implies SR is a candidate key.

Checking Statement II (Lossless and Dependency Preserving):

  1. Lossless Join: Y∩Z=(PR)∩(QRS)=RY \cap Z = (PR) \cap (QRS) = R.
    In FF, we have R→PR \to P, which means RR functionally determines Y=(PR)Y = (PR) (RR is a superkey of YY). By the lossless join theorem, the decomposition is lossless.
  2. Dependency Preservation:
    • R→PR \to P is preserved in Y(PR)Y(PR).
    • QR→SQR \to S and S→QS \to Q involve only attributes of Z(QRS)Z(QRS) and are preserved in Z(QRS)Z(QRS).
      All functional dependencies in FF are preserved. Thus the decomposition is dependency preserving.
      Hence, Statement II is TRUE.

Checking Statement I (BCNF for Y and Z):

  1. In Y(PR)Y(PR), the candidate key is RR, and the only dependency is R→PR \to P. Since RR is a superkey, YY is in BCNF.
  2. In Z(QRS)Z(QRS), candidate keys are QRQR and SRSR.
    The dependency S→QS \to Q holds in ZZ. Here, the determinant SS is NOT a superkey of ZZ because S+=SQ≠QRSS^+ = SQ \ne QRS.
    Thus, ZZ violates BCNF.
    Hence, Statement I is FALSE.

Therefore, only Statement II is correct (Option C).

Final answer

C

Common trap

Assuming Z is in BCNF because S is a prime attribute (which satisfies 3NF, but NOT BCNF).

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2019 Computer Science and Information Technology (CS)
Question
42 of 65, printed as CS Q.32
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.