Please help me to be clear about the definition of primary key. When I work with
Chinook.db, related to schema diagram, DQ provided the definition as follows:
Each table has one or more columns with shading, which indicates those columns are primary keys. We'll learn more about primary keys in a later lesson, but for now all you need to know is that each row's primary key must be unique.
If we look at the
playlist_tracktable, we see that there are 2 columns with shading, so I understood that these are primary key (i.e. the values must be unique). However, when I print first 5 rows of
playlist_trackI received the output like this:
The values in
playlist_id column are not unique. So why is the name of this column highlighted in schema diagram?
Thank you in advance.