Unique Key
UNIQUE means no duplicate values in that column (or column set), but one NULL may be allowed depending on version/SQL mode — in practice treat UNIQUE email as ‘each email once’.
PRIMARY KEY is UNIQUE + NOT NULL + the main identifier (only one PK). You can have many UNIQUE keys (email, phone).
Trap — UNIQUE vs PRIMARY KEY as identical. Trap: UNIQUE on a column that legitimately repeats (city).
On the example next to this theory — Unique Key — keys and constraints protect data integrity; indexes speed lookups.
students.id ← PK (unique)
▲
│ FK
marks.student_idExam tip
UNIQUE email. PRIMARY KEY roll. Many UNIQUE, one PK.