Almo
Masterblazer
Hi!
We have users, and they are kept in a table. We have items, which have statistics and are kept in another table (actually a set of tables related by foreign keys).
As users play our game, they collect items, and they can have multiple copies of an item. I was thinking that we'd need a table with these columns: user_id, item_id, num.
I would then use a composite key using user_id and item_id.
Here's my question. The items are actually divided up into types: creatures, rooms, traps. As such they have completely different statistics, and are kept in different sets of tables.
This means I'll need to keep the IDs unique across types, or have seperate tables for the user's collections of different types of items. That's all fine, too. But I want to use foreign keys to keep everything clean, and I guess that means all of these things are stored in one database.
For some reason, it feels like users and their information should be kept in one DB, creatures in another, rooms in another, and traps in another.
Am I completely off base here? Should I feel fine storing all these different types of info in the same DB?
We have users, and they are kept in a table. We have items, which have statistics and are kept in another table (actually a set of tables related by foreign keys).
As users play our game, they collect items, and they can have multiple copies of an item. I was thinking that we'd need a table with these columns: user_id, item_id, num.
I would then use a composite key using user_id and item_id.
Here's my question. The items are actually divided up into types: creatures, rooms, traps. As such they have completely different statistics, and are kept in different sets of tables.
This means I'll need to keep the IDs unique across types, or have seperate tables for the user's collections of different types of items. That's all fine, too. But I want to use foreign keys to keep everything clean, and I guess that means all of these things are stored in one database.
For some reason, it feels like users and their information should be kept in one DB, creatures in another, rooms in another, and traps in another.
Am I completely off base here? Should I feel fine storing all these different types of info in the same DB?