I'm creating a gaming website that will have a database of items found in a game (several thousand) and I'm wondering what best practice would be for the database structure.
There are 5 item types: weapons, armor, potions, quest items and junk. Each of these has unique attributes that don't apply to other items. For example, weapons can be different types (i.e. two-handed, main-hand, off-hand), armor can be different weights (plate, leather), etc.
Everything is an 'item', but I'm wondering if I should I have a single table of items, i.e.:
item id, item_type ... item_weapon_type_id, item_armor_weight_id
Thus having all possible attributes in one table.
Or separate tables for each item type, i.e.:
weapon_id, weapon_type, weapon_name
I am wondering this since each item type has a number of unique attributes, which means a single table of items would have a lot of columns, many of which don't apply to 80% of the items in the table.
Thanks in advance for any help.