Consider a relation with seven attributes ABCDEGH. The following dependencies are given:AB -> C, AC -> B, AD -> E, B -> D, BC -> A, E -> GWhat is the key?
Question
Consider a relation with seven attributes ABCDEGH. The following dependencies are given:AB -> C, AC -> B, AD -> E, B -> D, BC -> A, E -> GWhat is the key?
Solution
To find the key of the relation, we need to find an attribute or a set of attributes that can determine all other attributes. This means that the key attribute(s) is on the left side of a functional dependency and all other attributes can be derived from it.
- Start with all attributes: ABCDEGH
- Look at the dependencies and remove attributes that are determined by others:
- AB -> C: Remove C, we get ABDEGH
- AC -> B: Remove B, we get ADEGH
- AD -> E: Remove E, we get ADGH
- B -> D: D is already removed.
- BC -> A: A is already in the set.
- E -> G: Remove G, we get ADH
- Now, we have ADH left. But none of these attributes appear alone on the left side of the dependencies. So, we need to check combinations.
- Check combinations:
- AD is on the left side and determines E. E determines G. So, AD can determine E and G. But it can't determine B and C.
- AH is not on the left side of any dependency. So, it can't be the key.
- DH is not on the left side of any dependency. So, it can't be the key.
- So, none of the combinations of ADH can determine all attributes. This means that our key is larger than this set.
- If we look at the dependencies again, we can see that B and C together can determine A (BC -> A). And A and D together can determine E (AD -> E). And E can determine G (E -> G). So, BC can determine A, D, E, and G.
- So, the key of the relation is BC.
Similar Questions
We have the attributes: {A, B, C, D}.Consider the following functional dependenciesA, B, C -> DA, C -> BB -> A, C, DA, B -> C, DA -> DFind all minimal keys.
Consider relation R(A,B,C,D,E) with functional dependencies:D -> C, CE -> A, D -> A, AE -> DWhich of the following is a key?CDEABCECE
Functional dependencies: implicationWe have the attributes: {A, B, C, D, E, F, G}.Consider the following functional dependenciesA, D, F -> EE, F, G -> DA, B -> FE -> BC, G -> D, FC, G -> B, EA, C -> EA -> C, EMark all functional dependencies that are implied by the dependencies above:A, C -> EA, C -> BA, C -> B, DA, C -> CA, C -> C, F
Consider relation R(A,B,C,D,E) with functional dependencies:AB -> C, C -> D, BD -> EWhich of the following sets of attributes does not functionally determine E
Consider a relation R=(M, N, O, P, Q) with the dependencies: {M,N ->O; O,P->Q ; P, Q-> N}. The key for relation R is :a.M, N, Ob.M, N, Pc.N, O, Pd.M, N
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.