Objective: Store Multivalue Attributes
This is the same objective as in Chapter 2, Jaywalking: an attribute seems to belong in one table, but the attribute has multiple values. Previously, we saw that combining multiple values into a comma-separated string makes it hard to validate the values, hard to read or change individual values, and hard to compute aggregate expressions such as counting the number of distinct values.
We’ll use a new example to illustrate this antipattern. We want the bugs database to allow tags so we can categorize bugs. Some bugs may be categorized by the software subsystem that they affect, for instance printing, reports, or email. Other bugs may be categorized by the nature of the defect; for instance, a crash bug ...
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