(I couldn’t find a good forum for this post so I put it here)
I am designing the database for my current online game. The problem I am having is the arrangement of lists. For example, if I have 10 items on my character and I save him to the database…I have to have 10 differen’t columns for these items. What about the person who hordes everything? I would need much may, say 100 columns.
This is not practical. So I am looking to find a solution so I can still use databases rather then flat files. One solution I have is to put it in 1 column titled, “items” which would hold the item IDs. Each item would them be broken up with a comma. When the server loads this column they will parse it for item IDs and then in turn, load them from the item DB based upon the IDs.
Example:
Items
1,2,3
So the player has items 1 2 and 3. (I would have to do more then this because items could be in a certain condition, or there could be more then 1).
Another solution would be to just increase the number of columns, which before I said wasn’t very practical.
So my overall question is: how do you design a DB for data that is unknown in length and size and can be very big?
Thank you.