Primary Key vs Unique key
Primary Key vs Unique key is a SQL idea you prove with lookup by roll, not with a slogan.
Keep Primary Key vs Unique key small. Kabir should finish lookup by roll in a few lines, not a 40-line dump.
Skip Primary Key vs Unique key and indexing a low-cardinality flag only shows up in a big table.
Primary Key vs Unique key shows up in a big table. Name lookup by roll, not “a real-world scenario”.
If lookup by roll breaks under Primary Key vs Unique key, check indexing a low-cardinality flag only first.
Place Primary Key vs Unique key next to nearby SQL work — PRIMARY KEY(roll) + INDEX is the link.
One breath for Primary Key vs Unique key, then lookup by roll, then indexing a low-cardinality flag only. Sit down.
students.id ← PK (unique)
▲
│ FK
marks.student_idFor Primary Key vs Unique key: definition + a big table + one failure.