421 views
0 votes
0 votes

i know how to find whether the decomposition is lossless or lossy . but in this type of question they are actually not defining how they decompose . they are only giving a set of functional depenencies . how to solve this type of question 

2 Answers

Best answer
0 votes
0 votes

Given a relation and a set of FDs, we might never be able to form a BCNF decomposition (in any way) which preserves all the dependencies. For example, in this question we are given a relation $R(A, B, C, D)$.

  1. $A \to B$ and $B \to CD$ are the FDs. We can decompose $R$ to $AB$ and $BCD$ and all dependencies are satisfied and $B$ is a key of second relation meaning decomposition is lossless. 
  2. $A \to B$, $B \to C$ and $C \to D$. We can decompose $R$ to $AB$, $BC$ and $CD$. 
  3. No dependency preserving BCNF decomposition possible. Because to preserve $C \to A$ dependency we need to have $C$ and $A$ in same relation as we can't imply this dependency using any transitive dependency. Similarly to preserve $AB \to C$, we must have $ABC$ as a relation. But then in this decomposed relation $AB$ and $BC$ becomes the candidate keys and $C \to A$ violates BCNF condition as $C$ is not a super key. 
  4. $A \to BCD$. No decomposition required. $R$ is already in BCNF. 
selected by
0 votes
0 votes
Option A. A--> B , B---> CD yes dependency preserving lossles join

Option B. A --> B, B---> C, C---> D Yes its is dependency preserving lossless join

Option D. A-->BCD yes dependency preserving lossless join

Option C. AB--> C, C--> A, C--->D

We cant put ABC in a single table so iti is lossles but dependency not preserved

Related questions

0 votes
0 votes
0 answers
2
Utk asked Dec 27, 2015
1,867 views
The answer is option c. I want to know how to solve these type of questions and how other options are not the correct answer.
6 votes
6 votes
2 answers
3