0
\$\begingroup\$

I have two types of items in my game, consumables, and equipment. For my database, should I store them in two different tables, or all in one big items table?

\$\endgroup\$
4
  • \$\begingroup\$ What is the fundamental difference between the two? Can your equipment eventually be consumed (e.g. it has durability and ends up breaking)? \$\endgroup\$
    – Vaillancourt
    Oct 7, 2019 at 19:16
  • \$\begingroup\$ No, equipment will last forever. Consumables are one time use. Equipment can be put on a character, have restrictions (e.g. bows are archer only, need to be x level), while consumables have no restrictions and can not be put on a character. \$\endgroup\$ Oct 7, 2019 at 19:25
  • \$\begingroup\$ Can you put arrows on character? \$\endgroup\$
    – Vaillancourt
    Oct 7, 2019 at 19:45
  • \$\begingroup\$ No, just weapon \$\endgroup\$ Oct 7, 2019 at 23:17

1 Answer 1

0
\$\begingroup\$

If you'll be managing both consumable and non-consumable in essentially the same way, it makes sense to put them in the same table.

This will make the management of the inventory much easier, and will let you create feature you do not think about now, such as wearing Arrows (because you have different types of arrows, you must let your user which type of arrows they consume).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .