06-12-2008, 07:25 AM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Jun 2008
Posts: 8
Thanks: 1
|
What is the best way to structure this database?
I am helping a friend building a site for a MMO to come up with drop rates or rare items from killing monsters. I want this database to be fully dynamic.
There needs to be a way to store monsters, and items.
How I currently have it is a table called 'monsters' with columns 'id' and 'name'. I then have a table called 'items' with columns 'id' and 'name'. These 2 databases will store all the Possible Monsters that people can kill, and every drop they could receive.
Now there needs to be a table for the logs. I use a table named 'drops' with columns 'id', 'monster_id', and 'item_id'. Only problem is that monsters can drop more then 1 item at a time. So how can I arrange it?
I was thinking of making item_id a string with it being something like 1-19|2-1|91-90| (first number being the quantity, second being the item_id, and then splitting the array 2 times to find out how much of each drop). Is there an easier way to do this?
Last edited by TexasMd91 : 07-02-2008 at 06:28 AM.
|
|
|
|