title: Game Database Design
body: <p>It's been awhile since my last post but I have decided to move on with trying my hand at game development. So right now something I am looking at is actual data storage. Probably not something that will be used while the game is necessarily running but on load, save and exit use.. Probably. Fact is I'm not sure yet. However, that is not the question of the hour for me. The real question I am facing is in a database design aspect. I can't for some reason wrap my head around how to design the items portion of the database. I am looking to do something efficient yet robust. Let me give some things I am reflecting on..</p>
  
  <ul>
  <li>Assuming that this is a Fantasy RPG even possibly MMO (though that part is not important)</li>
  <li>Trying to keep the OOP approach to this.</li>
  </ul>
  
  <p>Now the questions:</p>
  
  <ol>
  <li>If an Item can be multiple things (i.e. a potion/food (which I get consumables), a sword/staff (weapons)) what would be the database approach to this?</li>
  <li>Going as an add on to the above question... So a Sword can have different specs.. depending on Material based specs (base stats) to the potential augment based stats (buffs or debuffs).. How can I encapsulate that in the database without every single item needing that information there too. (Idea being if it isn't important to this item then don't include it at all. 
  
  <ul>
  <li>I am thinking the idea to this is.. if the item has a fire augment then in a table (probably some sort of junction table) define the:
  <code>
  StatID: primary key for this stat
  Item_ID: the item being affected
  Augment_ID: augment i.e. fire damage
  AugmentEffect: would be +/- value
  </code></li>
  </ul></li>
  </ol>
  
  <p>If someone can shed light on this would be great or... if someone knows a great location to find this information.</p>
  
  <p>I have attempted to look through the search.. sadly I don't know what to exactly search for that returns useful results to this topic and genre. Thanks in advance.</p>
  
  <p>~ Edit 1 ~
  This is kinda the approach I was thinking towards segregating the different types of "items" this way based on a flag is which table to look at. Would this work in practice?
  <a href="https://i.stack.imgur.com/OmLd3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OmLd3.png" alt="Game Database Example"></a></p>