📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

In an exam hall, RollNo is unique for one exam session but repeats next year. What should the designer do?

A. Use RollNo alone as the primary key
B. Remove RollNo from the table
C. Use the student's name as the key
D. Use a composite key such as (RollNo, ExamYear) or add a surrogate key ✅

Correct Answer: D. Use a composite key such as (RollNo, ExamYear) or add a surrogate key

Explanation

RollNo alone is not unique over time, so the key must include the year or be replaced by a stable surrogate identifier.