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, and open Albums table. Notice that there's a "label" badge next to "Year" column. Let's instead make "Album" the label column. Click on the dots icon next to the "Album" column header, and select "Use as label".
Now switch back to the Graph tab. Both genres and albums are now using the correct labels.