Concept and mechanism
A table represents entities or occurrences with defined columns and types. A primary key identifies a row; a foreign key relates values to a referenced key and helps prevent nonexistent references. Do not confuse row identification with validity of every business rule. Normalization reduces redundancy and update anomalies when attributes depend on different entities. If the current customer address repeats in every movement, partial updates can create competing versions. Keeping it in a referenced entity reduces that problem. Preserving the historical address of an operation is a different requirement needing explicit design.
Guided application
In daily work, distinguish commands changing structure from those manipulating data. CREATE and ALTER define objects; INSERT, UPDATE, and DELETE change records, while SELECT queries them. A regular view stores a query definition over underlying data without being an independent copy. An index can facilitate access but consumes resources and adds write maintenance. In a fictional reporting request, confirm whether the problem is data duplication, repeated query logic, or performance before proposing a solution. Test missing keys, duplicated attributes, and partial updates. Record grain and constraints so support can distinguish technical failure from invalid data.
A foreign key prevents a nonexistent account reference; it does not establish that the payment amount is correct.
Common pitfalls
Index as referential integrity; view as snapshot; normalization as removing all history.
Related topics: Data, workloads, and responsibilities · Relational services and compatibility · Non-relational storage and access
Model meaning and constraints before optimizing access.
Reference: Relational normalization principles · DP-900 skills measured 2026-07-21