Skip to content
Exercises · Q6

Q.What is a primary key? Why must its value be unique and not left blank?

ChseodishaTextbookSubjectiveImportance★★★★★est
40% · 6/15 Questions
🔒 Locked · start free trial →

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 →

A primary key is an attribute (or a combination of attributes) whose value uniquely identifies each tuple in a relation. For example, in a Student table, RollNo is a natural primary key because every student has a different roll number.

Why the value must be unique: if two tuples had the same primary-key value, there would be no way to tell them apart — asking for 'the student with RollNo 5' would return two different students. Uniqueness guarantees that each record can be picked out with no confusion.

Why it must never be left blank (NULL): the whole job of the primary key is to identify a record. If it were left empty, that record could not be reliably identified or referred to by other tables (through a foreign key). So a primary key must always contain a value. …

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.