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\$
  • \$\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 '19 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\$ – super potato Oct 7 '19 at 19:25
  • \$\begingroup\$ Can you put arrows on character? \$\endgroup\$ – Vaillancourt Oct 7 '19 at 19:45
  • \$\begingroup\$ No, just weapon \$\endgroup\$ – super potato Oct 7 '19 at 23:17
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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.