A key is a column or combination of columns that identifies rows or connects tables. Choose a value that is unique for the entity; then separate related data instead of repeating it. section 4.1.1
Use the two basic key types for different jobs:
- Primary key: uniquely identifies a row in its table. section 4.1.1
- Foreign key: points from a secondary table to a primary-key value or unique constraint, enforcing referential integrity. section 4.1.1
- Avoid repeating shared details: move office information into Offices, identify each office with OfficeID, and reference it from Employees. section 4.1.1
Sales orders and products
A unique Sales Order Number can identify an order. Because one order can contain several products, store order items separately and reference the Products entity rather than duplicating product details. section 4.1.1
Figure 4.1 ERD for Sales Orders
Use the sales-order ERD to inspect how keys connect orders with their related entities. section 4.1.1









