So, me and a friend of mine were throwing around ideas on how to store a list of 39 genres (like Action, Adventure) and not make it a taxing task on the database.
My idea was to have a list of 39 columns with the layout being,
Code:
Show_Name, Action, Adventure... (Etc)
Star Trek, 1
So you would have a 1 value in the genre that it is and then do a query like "SELECT Star Trek WHERE Action = '1'" (That may not work I just came up with it on the spot)
Now here is his idea that I need help with on the math.
He suggests that I use a list of numbers like this...
... And give each genre a value so that if they select multiple genres it will never add up to another one. (Example: If they select 0002 and 00020 and 0008 the value would equal 0030. We avoid using 30 so each combination would have its own number I guess)
Well we are debating on what is better and if we do go with Idea #2 what the numbers would be. I am sure there is some math way to figure it out that I am unaware of so I'm counting on you :P
If you can think of a better way to do it I would love to hear it! Thanks!