A database key links corresponding records when two systems store the same information differently. Here, it takes the practical form of a mapping table. section 9.3.1
When team names do not line up
One system might store team names in uppercase with no spaces, while another uses inconsistent formatting. Joining directly on the names may return only a few matches. A mapping table can record which name in one system corresponds to which name in the other. section 9.3.1
Use a key early when:
- You need to join tables from different systems. section 9.3.1
- Simple formatting cleanup cannot make values structurally equivalent. section 9.3.1
- Requirements gathering must confirm that existing data is usable, not merely available. section 9.3.1
Figure 9.9 System A stores team names in the format on the left, uppercase with no spaces, while system B on the right doesn’t follow any particular format. If you try to join these tables on System A’s team name equals system B’s team name, you might, at best, get a few results, but certainly not all of them. You’ll need to find some way to link them.
Compare the two team-name formats and see why an explicit mapping is needed before joining the tables. section 9.3.1
