The naming value
Show on a big screenOne value should name exactly one record. To name a record is to point to that one record only.
- Four rows from the register.
- Every admission number here is different.
- Two rows share this same name.
- Their admission numbers still tell them apart.
The rule
A key is a column whose values each name exactly one record. A single value names a record when only one record carries it.
Ask this register for "Ananya Suresh." Two records answer: A-108 and A-110. The name cannot say which one the office meant. So it names neither.
Look at the other columns too. Seven records share the section 9-A. Four share the due 1450. Only admission has no shared value.
Admission numbers are different by design. The school hands out one per student and never reuses it. That makes admission a key. The name column is not one.
Below are eight values to test. Sort each one by how many records carry it.
Loading lab…
Uniqueness means only one record carries the value. Uniqueness alone decides whether a value names a record. A value's length or look does not decide it.
Try the lab to finish this lesson.