📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Why is the composite key in a junction table important?

A. It makes the table slower
B. It prevents the same pair being recorded twice ✅
C. It prevents any inserts
D. It stores the names of both entities

Correct Answer: B. It prevents the same pair being recorded twice

Explanation

The composite primary key enforces uniqueness of each pair, so a student cannot be enrolled twice in the same course by accident.