its my first post here and im a bit worried about if it fits this forum.
Im making a project about a music library online, you signup in the website and you can add songs to your own list, something similar to spotify maybe. But i have some doubts about inserting the songs in the database because i dont want to have a popular song 30 times in the database, one idea i had is to only allow to insert songs in the database to an "admin" and people can see that admin song's list and add from there to their list and if the song you want is not in the list contact the admin but that seems tiring for the user. I guess another good option is that the form to add a song to your list shows you a select where you see existings album/songs and if you cant find it there then you create it in the database, but i need to think more into how to perform that idea.
The database is created with mysql, im pretty sure i will use pdo
The other idea you mentioned is a good option. Say you have three dropdowns one of Artist, second of Album and third of songs. Here you can list all the Artists in the database in the first dropdown. On selecting an artist, the albums related to the artist selected can be populated in the second dropdown. On selecting an album from this dropdown can populate all the songs in that album in the third dropdown. If the user feels that the song he wishes to add is not available in the third dropdown, he can click a button saying 'Suggest an Addition'. Clicking this button, a popup will appear which will have a dropdown of Artists available in the database, and another dropdown of all the albums. Against this selection, he can add a song. Also, I would suggest that every newly added song be subject to admin approval. This will prevent the duplicate entries of songs. For this, you can have a flag in the songs table which will be set based on admin approving the newly added song.
example:
Select Artist (dropdown 1)
Select Album (dropdown 2)
Select Song (dropdown 3)
Suggest an Addition (button)
Finally i think is a better idea to connect library table with song instead of album so people can have couple songs instead of the whole album and im going to manage the inserts from the website with selects on the form so the user doesnt create already existing content, sorry for the post to that people downvoted it