Test Index
Database Concepts
© examsnet.com
Question : 13 of 13
Marks:
+1,
-0
Differentiate between Candidate Key and Primary Key in the context of Relational Database Model.ORConsider the following table PLAYER :Table : PLAYER
(a) Identify and write the name of the most appropriate column from the given table PLAYER that can be used as a Primary key.(b) Define the term Degree in relational data model. What is the Degree of the given table PLAYER ?
PNO | NAME | SCORE |
|---|---|---|
P1 | RISHABH | 52 |
P2 | HUSSAIN | 45 |
P3 | ARNOLD | 23 |
P4 | ARNAV | 18 |
P5 | GURSHARAN | 42 |
[CBSE 2022 Code 91]
Solution:
(A) Candidate Key vs Primary Key
Example: In STUDENT(RollNo, AdmNo, Name), both RollNo and AdmNo are candidate keys; if RollNo is chosen, it is the primary key and AdmNo becomes an alternate key.OR (B)(a) PNO is the most appropriate column for the primary key: every player has a unique, short player number that will not repeat (names can repeat in future).(b) Degree: The number of attributes (columns) in a relation is called its degree.Table PLAYER has the columns PNO, NAME and SCORE, so its Degree = 3.
| Candidate Key | Primary Key |
| An attribute (or set of attributes) that can uniquely identify each tuple of a table. | The one candidate key chosen by the database designer to uniquely identify the tuples. |
| A table may have more than one candidate key. | A table has only one primary key. |
| Candidate keys not chosen as the primary key are called alternate keys. | It cannot have NULL or duplicate values. |
© examsnet.com
Go to Question: