Solution: Create Dependent Table
Explore how to solve the multicolumn attribute antipattern by creating a dependent table that stores multivalued attributes in separate rows. Understand how foreign keys link the dependent table to the main table, enabling easier querying and better data management. This lesson helps you learn practical methods to add, remove, and search tags related to bugs without duplication, improving your database design and query flexibility.
As we saw in the chapter Jaywalking, the best solution is to create a dependent table with one column for the multivalued attribute. Store the multiple values in multiple rows instead of multiple columns. Moreover, define a foreign key in the dependent table to associate the values to the key’s parent row in the Bugs ...