Q.Differentiate between Candidate Key and Primary Key in the context of Relational Database Model.
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →Part (a): a candidate key is any minimal unique identifier (many possible); the primary key is the chosen one and must be non-null.
Part (b): (a) PNO is the primary key of PLAYER; (b) Degree = number of columns = 3.
Part (a)
Candidate Key. A candidate key is an attribute, or a minimal set of attributes, that uniquely identifies each tuple (row) of a relation. "Minimal" means no attribute can be dropped without losing uniqueness. A single table can have more than one candidate key (for example both a Roll Number and an Aadhaar Id could each identify a student).
Primary Key. The primary key is the one candidate key selected by the database designer to be the table's main identifier. Two rules bind it: values must be unique, and — unlike other candidate keys — it can never be NULL (entity integrity). The remaining candidate keys are called alternate keys.
| Aspect | Candidate Key | Primary Key |
|---|---|---|
| How many | A table may have several | Exactly one per table |
| Selection | All are potential identifiers | The chosen candidate key |
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.