retagged by
13,369 views
24 votes
24 votes

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

Consider the two statements given below.

  1. Both $Y$ and $Z$ are in BCNF
  2. Decomposition of $X$ into $Y$ and $Z$ is dependency preserving and lossless

Which of the above statements is/are correct?

  1. Both I and II
  2. I only
  3. II only
  4. Neither I nor II
retagged by

2 Answers

Best answer
47 votes
47 votes

$Y$ is in BCNF because binary attribute.
$Z$ is not in BCNF because $S\rightarrow Q$ is in $Z$ and $S$ is not Super key.

Dependency Preserving:

  • $QR \rightarrow S$ in $Z$
  • $R \rightarrow P$ is in $Y$
  • $S \rightarrow Q$ is in $Z$

So it is dependency preserving.
Lossless:
$Y \cap Z = R$ which is is key of $Y$.
Lossless it is.
Only $2^{\text{nd}}$ is correct.

So Option C is the answer

edited by
0 votes
0 votes

F = {QR → S, R → P, S →Q}

X = (PQRS)

Candidate key: QR & SR    { (QR)+ = QRSP ; (SR)+ = SRQP}

partial dependency : R → P  {Prime attribute: Q,R,S ; Non-Prime Attribute : P} 

so, it is not in 2NF

Making 2NF  

Now it is in 2NF

checking for 3NF of relation Y(RP) and Z(QRS)

for relation Y(RP) it is in 3NF Because Binary relation is always BCFN (which means 1NF,2NF,3NF)

for relation Z(QRS) 

candidate key : QR & SR     { (QR)+ = QRS; (SR)+ = SRQ } 

so, it is in 3NF because  QR→ S { QR is a super key and S is prime attribute}

                                            S → Q { Q is a prime attribute} 

Now, checking for BCNF

Relation Y(RP) it is in 3NF Because Binary relation is always BCFN

Relation Z(QRS) is not in BCNF because S → Q where S is not a super key.


Now checking for FD Preserving:

FD(Y) = R → P

FD(Z) = QR → S , S → Q

FD = FD(Y) U FD(Z) = R → P, QR → S , S → Q = FD(X)

so,all function dependencies are preserve.

Now checking for Lossless:

  1. Y(RP) U Z(QRS) = X(PQRS)
  2. Y(RP) ∩ Z(QRS) = R { R is super key of Y relation)

so, it is lossless decomposition.

Thank you for reading.

 

Answer:

Related questions

39 votes
39 votes
5 answers
1
Arjun asked Feb 7, 2019
27,608 views
A relational database contains two tables Student and Performance as shown below:$$\overset{\text{Table: student}}{\begin{array}{|l|l|} \hline \text{Roll_no} & \text{Stud...
32 votes
32 votes
2 answers
2
Arjun asked Feb 7, 2019
14,310 views
Consider the following relations $P(X,Y,Z), Q(X,Y,T)$ and $R(Y,V)$.$$\overset{\textbf{Table: P}}{\begin{array}{|l|l|l|} \hline \textbf{X} & \textbf{Y} & \textbf{Z} \\\hli...
18 votes
18 votes
3 answers
4