Super Key and Candidate Key

Context: FIT2094_MOC · a super key uniquely identifies a tuple · a candidate key is a minimal super key · the pool the Primary Key is chosen from

Quick Revision

  • 🎯 Objective: super key uniquely identifies a tuple; candidate key is a minimal super key ➔ the PK pool.
  • 📦 Core Components: super key (unique) ➔ candidate key (unique + minimal) ➔ primary/alternate.
  • ⚡ Key Constraint: minimality is the discriminator — every CK is a super key, not vice versa.

📝 Core

1. The Two Keys

  • Super key ➔ an attribute set that uniquely identifies each tuple.
  • Candidate key ➔ a super key that is also minimal (irreducible).

2. Uniqueness + Minimality

  • Super key ➔ uniqueness only.
  • Candidate key ➔ uniqueness and can’t be reduced.
  • ExampleStudentID, Name is a super key, not a CK (drop Name).

3. Primary & Alternate

  • One CK → Primary Key ➔ the official identifier.
  • Remaining CKs → alternate keys ➔ (Email if StudentID is PK).

Key identities:

⚖️ Core Decision Matrix

SetUnique?Minimal?Type
StudentIDyesyescandidate key
Emailyesyescandidate key
StudentID, Nameyesnosuper key only
Namenonot a key

When It Flips: keys are maximal functional dependencies — a super key determines all attributes, a CK is a minimal determinant. Design procedure: super keys → candidate keys → Primary Key. Minimality echoes the FIT1058 minimal-set idea.

📊 Exam Execution Trace

Manual Execution Trace

Classifying STUDENT sets:

Step / StateSetVerdict
0 (Init)
1StudentIDcandidate key
2StudentID, Emailsuper key (not minimal)
3Emailcandidate key

⚠️ Common Mistakes

  • 💡 The full attribute set is always a super key ➔ tuples are unique (Relation Properties); candidate keys are only the minimal ones.

🧠 Active Recall