Computing F+F^+ and Candidate Keys for R(A,B,C,D,E)R(A,B,C,D,E)

Computing F+F^+ and Candidate Keys for R(A,B,C,D,E)R(A,B,C,D,E)

Verified Sources
Sep 13, 2026

We are given relation schema R=(A,B,C,D,E)R=(A,B,C,D,E) and a set of functional dependencies (FDs)
F={ABC,  CDE,  BD,  EA}F=\{A\rightarrow BC,\; CD\rightarrow E,\; B\rightarrow D,\; E\rightarrow A\}.

We will:

  1. Compute the attribute closure for sets of attributes using the standard FD-closure procedure (based on Armstrong-style reasoning).
  2. Use closures to derive the full closure F+F^+ (i.e., all FDs implied by FF).
  3. List all candidate keys of RR.

Key notions: attribute closure, functional dependency closure, superkey, candidate key.

Note: Exact computation of F+F^+ can be large; we will compute systematically by finding which single attributes imply which others, then expanding via transitivity.

type="info" title="Strategy overview" content="Compute closures (e.g., A+A^+, B+B^+, E+E^+, CD+CD^+) to identify which attributes become determined. Then convert those reachability results into implied FDs, building up F+F^+. Finally, enumerate minimal attribute sets whose closure is ABCDEABCDE."

Compute key attribute closures from $F$

  1. 1
    Step 1

    Initialize A+={A}A^+=\{A\}. Use ABCA\rightarrow BC to add B,CB,C. Then use BDB\rightarrow D to add DD. Then CDECD\rightarrow E adds EE. With EE, use EAE\rightarrow A (already have AA). So A+={A,B,C,D,E}A^+=\{A,B,C,D,E\}.

  2. 2
    Step 2

    Initialize B+={B}B^+=\{B\}. From BDB\rightarrow D, add DD. With DD alone we cannot use CDECD\rightarrow E (need CC too). Also EAE\rightarrow A doesn’t apply (need EE). So B+={B,D}B^+=\{B,D\}.

  3. 3
    Step 3

    Initialize C+={C}C^+=\{C\}. There is no FD with CC alone on the left (only CDCD). So C+={C}C^+=\{C\}.

  4. 4
    Step 4

    Initialize D+={D}D^+=\{D\}. There is no FD with DD alone on the left. So D+={D}D^+=\{D\}.

  5. 5
    Step 5

    Initialize E+={E}E^+=\{E\}. From EAE\rightarrow A, add AA. Then ABCA\rightarrow BC adds B,CB,C. Then BDB\rightarrow D adds DD. Then CDECD\rightarrow E confirms EE (already have it). So E+={A,B,C,D,E}E^+=\{A,B,C,D,E\}.

  6. 6
    Step 6

    We have A+=ABCDEA^+=ABCDE and E+=ABCDEE^+=ABCDE. Also B+={B,D}B^+=\{B,D\}, C+={C}C^+=\{C\}, D+={D}D^+=\{D\}.

From the step-by-step closures:

  • AA is a superkey because A+=ABCDEA^+=ABCDE.
  • EE is also a superkey because E+=ABCDEE^+=ABCDE.
  • BB is not a superkey since B+B^+ misses A,C,EA,C,E.
  • CC and DD are not superkeys.

This already suggests candidate keys will be among minimal subsets of {A,E}\{A,E\}.

type="warning" title="Beware: computing F+F^+ is not the same as listing only original FDs" content="The closure F+F^+ contains all implied FDs (including ones with left-hand sides like ADA\rightarrow D even if not listed). We must derive implications via repeated use of FDs."

1) Compute the closure F+F^+ (all implied FDs)

We proceed by deriving, from each relevant determinant, which attributes it forces.

A. All FDs with left side AA

We know A+=ABCDEA^+=ABCDE, so AA determines every other attribute:

  • ABA\rightarrow B
  • ACA\rightarrow C
  • ADA\rightarrow D
  • AEA\rightarrow E

Additionally, because ABCA\rightarrow BC is given, we keep:

  • ABCA\rightarrow BC and we can combine:
  • ABCDA\rightarrow BCD
  • ABCEA\rightarrow BCE
  • ABDEA\rightarrow BDE
  • ACDEA\rightarrow CDE
  • ABCDEA\rightarrow BCDE (Any superset on the right that does not add new info beyond ABCDEABCDE is implied.)

A compact way: since A+=ABCDEA^+=ABCDE, for any Y{B,C,D,E}Y\subseteq \{B,C,D,E\}, we have AYA\rightarrow Y.

B. All FDs with left side EE

Similarly E+=ABCDEE^+=ABCDE, so EE determines every other attribute:

  • EAE\rightarrow A (given)
  • EBE\rightarrow B
  • ECE\rightarrow C
  • EDE\rightarrow D

And combinations:

  • EBCE\rightarrow BC
  • ECD?E\rightarrow CD? (careful: EE determines CC and DD separately, hence ECDE\rightarrow CD is implied)
  • In general, for any Y{A,B,C,D}Y\subseteq \{A,B,C,D\}, EYE\rightarrow Y holds (and EE\rightarrow any nonempty subset of ABCDE{E}ABCDE\setminus\{E\} is implied).

C. FDs with left side BB

We found B+={B,D}B^+=\{B,D\}. Therefore:

  • BDB\rightarrow D (given)
  • BBDB\rightarrow BD is redundant; the meaningful ones are: BDB\rightarrow D. No other attribute is forced by BB alone, so there are no implied FDs like BAB\rightarrow A or BEB\rightarrow E (unless AA or EE are derivable—which they are not from B+B^+).

So the only nontrivial right-side implications from BB are those involving DD:

  • BDB\rightarrow D (and thus BDB\rightarrow D is the only new FD with left BB).

D. FDs with left side CC

C+={C}C^+=\{C\}, so there are no nontrivial FDs of the form CXC\rightarrow X with X⊈{C}X\not\subseteq\{C\}.

E. FDs with left side DD

D+={D}D^+=\{D\}, so there are no nontrivial FDs of the form DXD\rightarrow X with X⊈{D}X\not\subseteq\{D\}.

F. FDs with left side CDCD

We have CDECD\rightarrow E (given). From that:

  • Since EAE\rightarrow A, we get CDACD\rightarrow A.
  • Since ABCA\rightarrow BC, we get CDBCD\rightarrow B and CDCCD\rightarrow C (already have CC).
  • Since BDB\rightarrow D, we get CDDCD\rightarrow D (already have DD).

Therefore CD+=ABCDECD^+=ABCDE, meaning:

  • CDECD\rightarrow E (given)
  • CDACD\rightarrow A
  • CDBCD\rightarrow B
  • CDCD\rightarrow (any subset of ABCDE{C,D}ABCDE\setminus\{C,D\}) In particular, CDABCECD\rightarrow ABCE etc. are implied.

Also note: CDECD\rightarrow E is the “seed” that makes CDCD a superkey.

G. FDs with left side ACDACD, ABDABD, etc.

In principle, once the closure of a left-hand set is ABCDEABCDE, then any FD from that left-hand set to any subset of the remaining attributes is implied. For example:

  • (A,D)+(A,D)^+ is already ABCDEABCDE because AA already closes everything. Hence ADBCDEAD\rightarrow BCDE etc. But enumerating every possible left-hand set would be exhaustive; typically in database courses, F+F^+ is described by the closure computation rules plus all derived FDs at the level of single attributes and given minimal determinants.

To keep the course section precise, we’ll list the core implied FDs (single-attribute and the original multi-attribute ones) that arise necessarily from the closures above.

Core implied dependencies (a practical representation of F+F^+)

From the closure results:

  1. From A+=ABCDEA^+=ABCDE:
  • ABA\rightarrow B
  • ACA\rightarrow C
  • ADA\rightarrow D
  • AEA\rightarrow E
  • plus the given ABCA\rightarrow BC (and therefore ABCDEA\rightarrow BCDE is implied, etc.)
  1. From E+=ABCDEE^+=ABCDE:
  • EAE\rightarrow A (given)
  • EBE\rightarrow B
  • ECE\rightarrow C
  • EDE\rightarrow D
  • plus any combined forms such as EABE\rightarrow AB etc. (implied)
  1. From B+={B,D}B^+=\{B,D\}:
  • BDB\rightarrow D (given)
  • no implied BA,C,EB\rightarrow A,C,E
  1. From CD+=ABCDECD^+=ABCDE:
  • CDECD\rightarrow E (given)
  • CDACD\rightarrow A
  • CDBCD\rightarrow B
  • and thus CDCD\rightarrow any subset of {A,B,E}\{A,B,E\}
  1. No nontrivial implications from CC or DD alone:
  • no additional FDs of the form CXC\rightarrow X (XCX\neq C)
  • no additional FDs of the form DXD\rightarrow X (XDX\neq D)

2) List the candidate keys for RR

A candidate key is a minimal superkey.

We already computed:

  • A+=ABCDEA^+=ABCDE so AA is a superkey.
  • E+=ABCDEE^+=ABCDE so EE is a superkey.
  • Any set containing AA is a superkey, but AA itself is minimal (cannot remove AA).
  • Any set containing EE is a superkey, but EE itself is minimal.

Also, sets without AA or EE:

  • B+={B,D}B^+=\{B,D\} cannot reach AA or EE.
  • C+={C}C^+=\{C\}, D+={D}D^+=\{D\}.
  • CDCD is a superkey (because CDECD\rightarrow E then closure reaches all), but it is not minimal because neither CC nor DD alone is a superkey, and for candidate key minimality, we check whether CDCD can be reduced to a smaller superkey. Any smaller subset of CDCD is either {C}\{C\} or {D}\{D\}, neither of which is a superkey. So CDCD is minimal among its subsets—however, candidate keys are minimal superkeys overall: since neither {C}\{C\} nor {D}\{D\} is a superkey, CDCD qualifies as a candidate key.

So candidate keys are:

  • {A}\{A\}
  • {E}\{E\}
  • {C,D}\{C,D\}

Closure-to-candidate-key workflow

Compute single-attribute closures

1

Find A+,B+,C+,D+,E+A^+,B^+,C^+,D^+,E^+."

Identify superkeys

2

Any XX with X+=ABCDEX^+=ABCDE is a superkey."

Enforce minimality

3

Candidate keys are superkeys whose proper subsets are not superkeys."

Enumerate candidates

4

Conclude minimal superkeys: {A}\{A\}, {E}\{E\}, and {C,D}\{C,D\}."

Closure sizes for single attributes

How many attributes each single attribute determines under FF.

FAQ: common pitfalls

Knowledge Check

Question 1 of 4
Q1Single choice

Which of the following is true under FF?

Key terms for this problem

1 / 5
Question · Term

attribute closure (X+)

Click to reveal
Answer · Definition

The set of attributes functionally determined by X using FDs in F.