Open the "Top Music Albums" project from the previous lesson. In data tab, locate the "Genre" column.
Click on the "..." icon that appears when you move your mouse over column header. Select the "To relationship" item.
When creating a relationship, you have to options: A to-one relationship and a to-many relationship. After glancing at our genre column, we'll see that some albums reference multiple relationships, for example
To accommodate for these to-many genres, we'll select the to-many relationship type. We'll also have to specify a delimiter. In this case, we can leave the default
, value, because our genres are separated by the comma symbol.
The next step is to pick a target table. You have an option to match values against an existing table.
In this case, we don't have the target Genres table just yet, so we'll stick with the default "Create new table" option.
After a short while, the table will refresh itself. You'll notice that values in Genre column are now changed from text to relationships.
From the top menu, switch over to the graph tab. You will now see a graph with your albums and related genres. Notice that something is wrong with these graphs. Genre has the correct label, but albums are labelled by their years.
We need to change column used for graph labels in the albums table.
Switch back to the data tab. Once again, edit the Albums table.
In the form that shows up, change value of "Column for graph label" to "Album". Save the changes.
Now switch back to the Graph tab. Both genres and albums are now using the correct labels.