Question

There are the set of FD for a Relation R(A, B,C,D,E,F,G) F= (A->B, BC->DE, AEF->G, AC->DE)...

There are the set of FD for a Relation R(A, B,C,D,E,F,G)
F= (A->B, BC->DE, AEF->G, AC->DE) Then
a) What are the Candidate keys for R? Justify your answer.
b) Is R in BCNF? Justify your answer.
c) Give a 3NF decomposition of this Relation.
d) Is your answer above is Lossless join and Dependency Preserving.?

Homework Answers

Answer #1

R(A,B,C,D,E,F,G)

Candidate Keys of relation are minimal set of attributes that are uniquely identifying row in the relation.

Method to find candidate keys:

Finding closure: if closure contains all attributes present in the relation then it is candidate key.

This set should be minimal set.

Closure of attribute lists all attributes that are present in the right hand side of current attribute.

Funtional dependencies:

A->B

BC->DE

AEF->G

AC->DE

A closure={A,B} not all attributes listed in the set hence A only is not candidate key.

{ACF} closure =>{ A,C,F,G,B,D,E } all attributes listed in the set hence {ACF} is candidate key.

BDE closure => { B,D,E } not all attributes listed in the set.

Hence, ACF is the candidate key.

b)

Rule for BCNF:

Every functional dependency must have super key on left side.

Super key: set of attributes that are uniquely identifying row in the relation.

Method to find super keys:

Finding closure: if closure contains all attributes present in the relation then it is super key.

Closure of attribute lists all attributes that are present in the right hand side of current attribute.

Funtional dependencies:

A->B

A closure ={ A,B} hence not super key

BC->DE

BC closure ={ B,C } hence not super key

AEF->G

AEF closure ={A,E,F,G,B} hence not super key

AC->DE

AC closure={A,C,B,D,E} hence not super key

Hence, it is not BCNF

C)

3NF:

If a->b is Functional dependency then a and b should not be non-prime attributes. This is rule for 3NF

Candidate Keys of relation are minimal set of attributes that are uniquely identifying row in the relation.

In this set, each attribute is called prime attributes. Attributes which are not belongs to any candidate key are non-prime attributes.

Funtional dependencies:

Candidate key is { A,C,F }

A->B Since A is prime attribute, it is following 3NF

BC->DE it is not following

AEF->G it is not following

AC->DE it is following 3NF

Now 3 NF decomposition:

R(A,B,C,D,E,F,G)

BC->DE not following

Step 1:

Find closure of BC

BC closure={B,C,D,E}

Step 2:

Apart from BC,Extra attributes D,E should be eliminated from R(A,B,C,D,E,F,G)

And should form new relation as follows.

R(A,B,C,D,E,F,G)

Decomposed into

R1(A,B,C,F,G)

R2(B,C,D,E)

Again R1 table should be decomposed to new table as AEF->G it is not following

AEF closure={ A,B,E,F,G}

Apart from AEF, extra attributes B,G should be elimited from R1(A,B,C,F,G)

R(A,B,C,D,E,F,G)

Decomposed into

R1(A,C,F)

R2(B,C,D,E)

R3(A,B,E,F,G)

R3(A,B,E,F,G) no significance B here, hence while decomposition we can leave attribute in the R1 relation.

Finally R(A,B,C,D,E,F,G)

Decomposed into

R1(A,B,C,F)

R2(B,C,D,E)

R3(A,E,F,G)

D)

Lossless join:

Relation should have common attributes with atleast one relation and those attributes should be primary key for one of those relations. Then it is lossless join. Otherwise it is lossy.

R1 and R2 have common BC . BC is key for R2

R1 and R3 have common AEF. AEF is key for R3

Hence it is lossless

Dependency preserving: After decomposition, final relations should follow given functional dependencies.

R1(A,B,C,F) R2(B,C,D,E) R3(A,E,F,G)

A->B : it is followed by R1

BC->DE : it is followed by R2

AEF->G: it is followed by R3

AC->DE

A->B if we apply C on both sides, it becomes AC->BC

R2 follows BC->DE

By transitive law, if AC-> BC and BC->DE then AC->DE

Hence, all functional depencies are followed by decomposed relations. It is dependency preserving.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Given a relation R(A, B, C, D, E) with the following FD Set FD = {...
Given a relation R(A, B, C, D, E) with the following FD Set FD = { A→C, B→C, C→D, DE→A, CE→A} Suppose we decompose it into R1(A, D), R2(A, B), R3(B, E), R4(C, D, E) and R5(A, E), is it a lossless decomposition? Show your proof.
Consider the following relation A B C D E F with functional dependencies A --> B...
Consider the following relation A B C D E F with functional dependencies A --> B C --> E E --> F and decomposition into A B C D F C E Which of the following statements is true? A-Decompositions were necessary to convert the relation into 3NF but the proposed one does not satisfy the lossless join property. B-The decomposition was unnecessary since the relation was already in 3NF. C-Decompositions were necessary to convert the relation into 3NF but...
Suppose we have the following relation R with composite primary key {A,B} together with the set...
Suppose we have the following relation R with composite primary key {A,B} together with the set FD of functional dependencies: R(A,B,C,D,E,F,G). FD = { C -> G, E -> B, A -> D, AB -> C, AB -> D, AB -> E. AB -> F, AB -> G } Draw the initial dependency diagram using the above information. The relation from part a) is in first normal form. Using the techniques described in the lecture, convert it to 2NF by...
4. Consider the relation schema R(ABCDE) with the set of functional dependencies F={B→E, A→B, DE→C, D→A,...
4. Consider the relation schema R(ABCDE) with the set of functional dependencies F={B→E, A→B, DE→C, D→A, C→AE}. For the following relations resulting from a possible decomposition of R, identify the non-trivial functional dependencies which can be projected to each of the decomposed relations. a) S(ABC) b) T(BCE) c) U(ABDE
Please quesiton on database function dependency: Suppose we have relation R (A, B, C, D, E),...
Please quesiton on database function dependency: Suppose we have relation R (A, B, C, D, E), with some set of FD’s , and we wish to project those FD’s onto relation S (A, B, C). Give the FD’s that hold in S if the FD’s for R are: c) AB --> D, AC --> E, BC --> D, D --> A, and E --> B. d) A --> B, B --> C, C --> D, D --> E, and E...
Please answer ASAP Database Consider the relation scheme R = {A, B, C, D, E} with...
Please answer ASAP Database Consider the relation scheme R = {A, B, C, D, E} with the FDs A --> BC CD --> E Consider the following decompositions: (4.a) R1 = {A, B, C} and R2 = {C, D, E} (4.b) R1 = {A, B, C} and R2 = {A, D, E} (4.c) R1 = {A, B} and R2 = {A, C, D, E} (4.d) R1 = {A, B, C}, R2 = {C, D, E} and R3 ={A, D}. For...
Let S = {A, B, C, D, E, F, G, H, I, J} be the set...
Let S = {A, B, C, D, E, F, G, H, I, J} be the set consisting of the following elements: A = N, B = 2N , C = 2P(N) , D = [0, 1), E = ∅, F = Z × Z, G = {x ∈ N|x 2 + x < 2}, H = { 2 n 3 k |n, k ∈ N}, I = R \ Q, J = R. Consider the relation ∼ on S given...
There is no equivalence relation R on set {a, b, c, d, e} such that R...
There is no equivalence relation R on set {a, b, c, d, e} such that R contains less than 5 ordered pairs (True or False)
Exercise #4 Using the Functional Dependencies, F = {A → BC ; CD → E ;...
Exercise #4 Using the Functional Dependencies, F = {A → BC ; CD → E ; B→D ; E→A} a) Compute the closure of F (F+). b) Is true / false : F ⊨  E → BC? c) Provide the minimal cover Fc (min(F)) using steps shown in the class. d) List of the candidate keys for R
Define a relation on N x N by (a, b)R(c, d) iff ad=bc a. Show that...
Define a relation on N x N by (a, b)R(c, d) iff ad=bc a. Show that R is an equivalence relation. b. Find the equivalence class E(1, 2)
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT