Skip to main content

Find closure (AG)+

Short answer

(AG)+ = {A, B, C, G, H, I}, which is all of R, making AG a superkey and candidate key (since neither A nor G alone is a key).

Find (AG)+ if R = (A, B, C, G, H, I) and F = {A → B, A → C, CG → H, G → I, B → H, CG → I}.

The attribute closure (AG)⁺ is the set of all attributes functionally determined by A and G. Start with result = AG and keep adding right sides of FDs whose left sides are already inside the result.

F = {A → B, A → C, CG → H, G → I, B → H, CG → I}

StepFD usedReasonresult
0startA G
1A → BA in resultA B G
2A → CA in resultA B C G
3CG → HC, G in resultA B C G H
4G → IG in resultA B C G H I
5B → H, CG → Inothing newA B C G H I

(AG)⁺ = {A, B, C, G, H, I}, which is all of R.

Conclusions

  • AG is a superkey of R, because (AG)⁺ = R.
  • It is also a candidate key: A⁺ = {A, B, C, H} lacks G and I, and G⁺ = {G, I} lacks the rest, so neither A nor G alone is a key. AG is minimal.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Database Management System chapter 4 questions →