relational database - How to relate tables in Mysql -


I am creating a music download website. There are three tables named song_tbl, artist_tbl, album_tbl.
Song_tbl
Enter image details here

Artist_tbl
< Img src = "https://i.stack.imgur.com/SqJU1.png" alt = "Enter image details here">

album_tbl

Every artist has an artist but the problem is that there are more than one artist in some songs (Example: Song 2 can have two stars = Patrs and Artists 3). So how do I manage it? Thank you for help.

You must be a table song - artist_itist_tibil which links songs to artists. There should be 2 columns: song_id and artist_id, and then if the song is linked to 2 artists 2 and 3, then you have:

  song_artist_tbl song_id artist_id 2 2 3   

Then you can remove the artist_id column from the song_tbl table .

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -