SQL 2/8 primary key


#1

I created ‘artists’ table with primary key.
I understand that data was automatically added to the ‘artists’ table but
How does the artist ID 1 The Beatles know which album is associated with Beatles?
I don’t see anything in common between the two tables.


#2

Add new column to your table and name it “album” or the name of your choice. When storing data to ‘artists’ table, Define a variable that holds album name of the artist and save this name into the category column you just created.
Example:

  1. The Beatles AlbumOne mix.mp3
  2. The Beatles AlbumOne mit.mp3
  3. The Wagon AlbumTwo sing.mp3

mysql table: ID | name | album | file

…Just trying to help!


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.