Solution: Create Dependent Table

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 table.

Patterns among antipatternsPatternsAntipatterns

In this lesson, we will create a dependent table to deal with multivalued attributes.

Creating a dependent table

Here we are creating a Tags table that contains tags for the bugs and stores the information related to the bugs.

Get hands-on with 1200+ tech skills courses.