sunidhi sunidhi - 26 days ago 8
MySQL Question

Database design for a lyrics site

I'm new to PHP and MySQL. For my project I want to make a site for lyrics. How to design the database and the relationships?

Here is what I have so far:

Artist


  • Artist_id

  • Artist_name

  • Artist_bio

  • Artist_thumb



Albums


  • Album_id

  • Artist_id

  • Genre_id

  • Album_title

  • Release_year



Genre


  • genre_id

  • genre_name



Tracks


  • track_id

  • track_title

  • album_id



Please let me know if I'm wrong.

Answer Source

I strongly recommend WWWSQLDesigner to design your database. Guideline that brianreavis had mentioned are really worthy of listening. Always use correct spelling, use consistent grammar, capitalization and underlining (_). Also you may consider adding multiple genres using a relationship table.

  album_genre ( id int, album int, genre int )

For album or artist pictures, I recommend you to save them to a folder with their related id's. Observe,

 id = 14
 artist = 42
 title = Mask And Mirror
 year = 1994

 thumbnail: /thumbnails/album-14.jpg