Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 413 Bytes

Database mistakes.md

File metadata and controls

11 lines (8 loc) · 413 Bytes

A business-relevant field as a primary key is a mistake.

- the value can change (which lad to entity no longer identified by that field)
- you don't have access to that field
- solution: create a new field just for the primary key (Surrogate key).

Storing the age

  • age is need to re calculated when ever it is needed

Referential integrity

Storing optional types of data in different columns