Question

Q2: Explain with example the difference between super keys and functional dependencies in relational databases. Show how to f

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Super key is a set of one or more attribute which can uniquely identify a row in the relational schema while function dependecies can not identify the whole row but the can identify the attributes that are dependent.

For a relation schema R = {A, B, C, D, E} and functional dependencies F = {CE \rightarrow D, D \rightarrow B, C \rightarrow A} super key for this relational schema can be ACE by using ACE we can uniquely identify a row but by using a functional dependecies we can not uniquely identify a row.

Candidate key in the minimal super key or minimal set of attributes that can uniquely identify a row in the schema. Every candidate key is a super key but vice versa is not true.

Given relational schema and its functional dependencies:

R = {A, B, C, D, E, F, G, H, I, J, K, L, M}

F = {A \rightarrow BCDE, E \rightarrow FGH, I \rightarrow J, AI \rightarrow K, AL \rightarrow M}

Check all the attributes that are not available on the right side of the functional dependencies. A, I, L are not present on the right side of the functional dependencies. Now find the Attribute Closure of A, I, L.

(A, I, L)+ = {A, I, L}

= {A, B, C, D, E, I, J, K, L, M} ( Using A \rightarrow BCDE, I \rightarrow J, AI \rightarrow K, AL \rightarrow M)

= {A, B, C, D, E, F, G, H, I, J, K, L, M} ( Using E \rightarrow FGH)

As (A, I, L)+ give the set of all attribute of relation R. So it is an candidate/super key.

If you're still having any doubt then please feel free to ask in the comment section.

Add a comment
Know the answer?
Add Answer to:
Q2: Explain with example the difference between super keys and functional dependencies in relational databases. Show...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT