Chapter 13
Softcoded Values
Most database applications directly map concepts to tables. The direct approach is effective for applications with well-defined entity types and attributes. However, it fails for applications with open-ended requirements.
Consider person data. Persons are prominent in applications and can involve much data. For example, a police database could have a lengthy description of suspects including height, weight, eye color, and hair color. The top of Figure 13.1 shows a database table for Person, using a direct representation (hardcoding). The bottom shows an alternative representation using softcoding. The columns in boldface are primary keys.
Figure 13.1
Database tables for hardcoding vs. softcoding.
If the requirements ...
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