A primary key is a column whose value uniquely identifies each row in a table. It becomes especially important when tables contain many observations, such as visits, users, clicks, or transactions. section 3.5.1
A useful primary key should:
- Contain a unique value for every row. section 3.5.1
- Preferably use an integer, although an alphanumeric string can also work. section 3.5.1
- Represent an identifier rather than descriptive information such as fruit type or taste score. section 3.5.1
Fruit ID
A fruit-tasting table assigns each observation a Fruit ID: 1 for apples, 2 for kiwis, and so on. Repeated fruit types can still have different primary keys because each row records a separate observation.




















