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:
- Y(RP) U Z(QRS) = X(PQRS)
- Y(RP) ∩ Z(QRS) = R { R is super key of Y relation)
so, it is lossless decomposition.
Thank you for reading.