I've been lucky to not been forced to use arrays in my life so far. But I guess they are quite good, so now I'm planning to use it for the first time.
I've been reading stuff about it and I think I understand how to use it and work with it. But there is something I just haven't found the answer to so far.
Let's say I have a table of a music collection. There are 100 songs in table_music
This one have the name of the song, the artist and then what type of genre.
So, I thought I would use arrays for the genres and have them stored in a table called table_genre
How should I build the genre_table? Is there a row for every type of genre?
And what if there are a new music genre coming up one day. Should I just add one more field to my table?
When I insert a new song to my table, I want all the genres to be listed alphabetically. And then I can check the ones that are right for the type of music. Maybe on song is both jazz and blues. Or one track is both pop, rock and soft rock.
What is the best way to store these genres and what if I want to update the settings one day (maybe changed my mind about a song or a new genre is added that is perfect for that old song in my database).
Can someone just give me a little hint on what would be the best for this example?
Just don't want to start in the wrong end and end up with something that might not work later...