• edited by
29,673 views
64 64 votes

For relation R = (L, M, N, O, P), the following dependencies hold:

$ M \rightarrow O,$ $NO \rightarrow P,$ $P \rightarrow L$ and $L \rightarrow MN$

R is decomposed into R1 = (L, M, N, P) and R2 = (M, O).

  1. Is the above decomposition a lossless-join decomposition? Explain.
  2. Is the above decomposition dependency-preserving? If not, list all the dependencies that are not preserved.
  3. What is the highest normal form satisfied by the above decomposition?

6 Answers

Best answer
81 81 votes
  1. Yes as $R_1 ∩ R_2 = M$ and $M → O$
     
  2.  NO
    From the Dependencies obtained from $R_1$ and $R_2$, we CANNOT infer $NO → P$
    Mistake That CAN be made: Here we CANNOT apply Pseudo Transitivity Rule using $M→O$ & $MN →P $ to obtain $NO → P$ because the rule says :if $M→O$ and $NO→P$ then $NM→P$ or $MN→P$ , But here we have $M→O$ and $MN→P$ ... SO we CANNOT apply the rule here to obtain $NO→P$ from it.
     
  3. BCNF
    $R_1$ keys : $P,L,MN$ hence BCNF
    $R_2$ key : $M$ hence BCNF
• edited by
21 21 votes

a.In R1 and R2 the common attribute is M,M+={MO}.We see that M is key for one of the decomposed relation R2,hence the decomposition is lossless.

b,

R1                           R2

P->L,L->MN              M->O

In R1 FD s covered are P →L and L →MN,in R2 M→O,.

We see that NO →P cannot be directly covered by any of the FD s in the decomposed relation.So this demands finding the additional FD s that can be implied in R1(using P →L and L →M,L->N),as well as R2(using M->O).All these FD s fail to cover NO->P ,as no way we can obtain P in the RHS.

So NO->P is not covered.

c)So till now we get.

R1                           R2

P->L,L->MN              M->O

R2 being a binary relation is in BCNF,M is SK and is LHS.

In R1 P is the key,

P+={PLMN}.

P is SK LHS and non trivial dependency.So ok.
L is non prime as well as MN is also non prime.So Transitive dependency is present.So not 3 NF.

Key is single attributed ,so no question of any prime attribute to be present.Hence 2 NF.
Hence highest Normal form in R1 is 2NF.

Colored portion is edited.

• edited by
6 6 votes

a)lossless-join decomposition

b)not decomposition dependency-preserving

c) R1-----> 2NF

    R2------>BCNF

1 flag:
✌ Edit necessary (js__)
5 5 votes
First of all we have to determine the functional cover of the set of functional dependencies as given to determine all the non-trivial functional dependencies those can be generated from the given set of functional dependencies.

F={M->O,NO->P,P->L,L->MN}

Now F+={M->O,NO->P,P->L,L->MN,L->M,L->N,NO->L,NO->MN,MN->P,OTHER TRIVIAL DEPENDENCIES}

We have two decompositions

R1={L,M,N,P}

Let F1 be the set of functional dependencies which will projected on R1 from F+.

So F1={P->L,L->MN,L->M,L->N,MN->P,OTHER TRIVIAL DEPENDENCIES}

We have R2={M,O}

So F2={M->O,OTHER TRIVIAL DEPENDENCIES}

Now F’=$F1\cup F2={P->L,L->MN,L->M,L->N,MN->P,M->O,OTHER TRIVIAL DEPENDENCIES}$

F’+={P->L,L->MN,L->M,L->N,MN->P,M->O,P->MN,P->M,P->N,OTHER TRIVIAL DEPENDENCIES}

now if we compare F’+ and F+ we can see that NO->P and NO->L dependencies are not present in F’+ which are present in F+.

So this decomposition is not dependency preserving.

But this is lossless join decomposition as common attribute M is the candidate key in relation R2.

Now R2 is BCNF as it is a two attribute relation.

For R1 we have to determine the candidate keys from F1.

And we can easily determine the candidate keys are P,L,MN.

and all the dependencies in the F1 preserve the property of BCNF i.e LHS of all the FDs should be a superkey.

So R1 is also BCNF.
0 0 votes

Those who solving the Part A Refer this link . 

Here There is also second method must to check, 

When You apply the  first method of Lossless join 

  1. R1 intersection R2 →  R1 or R2 must have superkey( then it lossless join 

        If not then check for this also ,

  1. if (R₁ ∩ R₂)→ (R₁ - R₂) or (R₁ ∩ R₂)→ (R₂ - R₁) holds in F⁺(this should be present in the given Functional Dependencies)  then it’s a lossless-join decomposition

database - Lossless Join Decomposition - Stack Overflow

0 0 votes
Given:

R = (L, M, N, O, P)

Functional Dependencies:
F = { M → O, NO → P, P → L, L → MN }

Decomposition:
R1 = (L, M, N, P)
R2 = (M, O)

A. Lossless-Join Decomposition

For a binary decomposition R → R1, R2, the decomposition is lossless if:

(R1 ∩ R2) → R1  OR  (R1 ∩ R2) → R2

Here,

R1 ∩ R2 = {M}

Now calculate M+:

M → O

Therefore,

M+ = {M, O}

Since R2 = (M, O),

M+ contains all attributes of R2.

Hence,

M → R2

Therefore, the decomposition is LOSSLESS-JOIN.

Answer: YES.

B. Dependency Preservation

We check each functional dependency:

1. M → O

Both M and O are present in R2.

Therefore, M → O is preserved.

2. P → L

Both P and L are present in R1.

Therefore, P → L is preserved.

3. L → MN

L, M and N are all present in R1.

Therefore, L → MN is preserved.

4. NO → P

N and P are in R1, but O is in R2.
There is no decomposed relation containing N, O and P together.

Also, NO → P cannot be derived from the projected dependencies of R1 and R2.

Therefore, NO → P is NOT preserved.

Hence, the decomposition is NOT dependency-preserving.

Dependency not preserved: NO → P.

C. Highest Normal Form

Consider R1 = (L, M, N, P).

The dependencies in R1 are:

P → L
L → MN

Find P+:

P+ = {P}
P → L
Therefore, P+ = {P, L}
L → MN
Therefore, P+ = {P, L, M, N}

Thus, P is a candidate key of R1.

Now consider:

L → MN

But L is NOT a superkey because:

L+ = {L, M, N}

P is not obtained.

Therefore, R1 is NOT in 3NF (and hence not in BCNF).

However, the candidate key P contains only one attribute.
Therefore, partial dependency is impossible.

Hence, R1 is in 2NF.

R2 = (M, O) has M → O, where M is a candidate key, so R2 is in BCNF.

Therefore, the highest normal form of the decomposition is:

2NF

FINAL ANSWERS:

A. Lossless-join decomposition: YES

B. Dependency-preserving: NO
   Dependency not preserved: NO → P

C. Highest Normal Form: 2NF
Position:
Show:

Related questions

80 80 votes
8 answers 8 answers
34.9k
34.9k views
Kathleen asked Sep 15, 2014
34,931 views
Relation $R$ with an associated set of functional dependencies, $F$, is decomposed into $\text{BCNF}$. The redundancy (arising out of functional dependencies) in the resu...
85 85 votes
8 answers 8 answers
30.7k
30.7k views
Kathleen asked Sep 15, 2014
30,688 views
From the following instance of a relation schema $R(A,B,C)$, we can conclude that:$$\begin{array}{|l|l|}\hline \textbf{A} & \textbf{B} & \textbf{C} \\\hline \text{1} & \...
73 73 votes
8 answers 8 answers
19.4k
19.4k views
Kathleen asked Sep 15, 2014
19,428 views
Relation $R$ is decomposed using a set of functional dependencies, $F$, and relation $S$ is decomposed using another set of functional dependencies, $G$. One decompositio...
45 45 votes
2 answers 2 answers
10.6k
10.6k views
Kathleen asked Sep 15, 2014
10,615 views
The following table refers to search items for a key in $B$-trees and $B^+$ trees.$$\begin{array}{|ll|ll|} \hline & \textbf {B-tree} & & \textbf {B}^+\text{-tree} \\\hl...