Why databases replace file systems, the relational model (relation, tuple, attribute, domain, degree and cardinality) and keys: candidate, primary, alternate, composite and foreign.
| Degree | the number of columns (attributes) |
| Cardinality | the number of rows (tuples); after adding a rows and deleting d: n + a − d |
| Primary key | unique and never NULL in every row |
| Alternate keys | all the candidate keys except the primary key (one fewer) |
| Foreign key check | look up each value in the referenced table; a missing value breaks referential integrity |
| Schema; instance | the structure of the relations; the data stored at one moment |
Table: ATTENDANCE
AttDate | RollNo | Status
2026-07-12 | 9 | P
2026-07-12 | 34 | P
2026-07-13 | 9 | P
2026-07-13 | 34 | P
2026-07-14 | 9 | P
2026-07-14 | 34 | P
Answer Yes or No: (a) Is AttDate alone unique? (b) Is RollNo alone unique? (c) Is the pair (AttDate, RollNo) unique?
Working: each date repeats for every student and each roll number for every date; the pair appears once
Answer: (a) No; (b) No; (c) Yes