Key Structures and Normalization
You might have seen some column names such as customerId and productId in previous tables. These columns relate to keys and normalization. Every persistent object in the system must be uniquely identified; the nature of object design and implementation frees us, somewhat, from having to worry about object uniqueness. When an object of a given class is created, it is assigned a unique ID for its lifetime; this is done internally in the language subsystem. However, unique IDs are not assigned when the object is persisted to, for example, Microsoft SQL Server or Oracle. When making the transition from the object view to the relational view, we need to consider the primary identifiers, or keys, that will make every ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access