Sarvagya Gupta
8 months ago

Find closure (AB) of given F.D

A→BC,E→CF,B→E and C→ EF

A. X^ + = {A, B}

B. X^ + = {A, C}

C. {AB}^ + = {A, B, C}

D. {AB}^ + = {A, B, C, E, F}

Answer: Option D

Solution (By Examveda Team)

Understanding Functional Dependency Closure

What is Functional Dependency (FD)?
A functional dependency (FD) like A → BC means that if you know the value of A, you can determine the values of B and C.

What is Closure?
The closure of a set of attributes (like AB) is the set of all attributes that you can determine from those attributes, based on the given FDs.

How to find the closure of {AB}?
1. Start with the initial set: {AB}⁺ initially contains A and B.

2. Apply the FDs: We'll keep adding attributes based on the given dependencies.
- A → BC means that if we have A, we can add B and C to the closure. So, {AB}⁺ becomes {A, B, C}.
- B → E means that if we have B, we can add E to the closure. So, {AB}⁺ becomes {A, B, C, E}.
- C → EF means that if we have C, we can add E and F to the closure. So, {AB}⁺ becomes {A, B, C, E, F}.
- E → CF means that if we have E, we can add C and F to the closure. We already have C and F. No change here.

3. Stop when no more attributes can be added.

Let's look at the options:
Option A: X⁺ = {A, B} - Incorrect, as we can derive more attributes.
Option B: X⁺ = {A, C} - Incorrect, AB is closure given not A, C.
Option C: {AB}⁺ = {A, B, C} - Incorrect, we can derive E and F as well.
Option D: {AB}⁺ = {A, B, C, E, F} - Correct, as we showed above, based on the given dependencies, we can derive C, E, and F from A and B.

Therefore, the correct answer is Option D.

This Question Belongs to Database >> Miscellaneous In Database

Join The Discussion

Related Questions on Miscellaneous in Database