MMO game inventory and item database schema

How an online game models items: templates versus instances, stacking rules, affixes rolled per copy, bags and bank and equipped slots, soulbinding, durability, two-sided player trades, mail with attachments and an append-only item audit log.

MMO Inventory ER diagram

MMO game inventory and item database schema n1 n1 n1 n1 n1 n1 11 n1 11 n1 n1 n1 n1 n1 n1 n1 n1 11 n1 n1 players idBIGINT usernameVARCHAR realm_codeVARCHAR levelSMALLINT backpack_slotsSMALLINT created_atTIMESTAMP last_seen_atTIMESTAMP item_templates idBIGINT codeVARCHAR nameVARCHAR item_classVARCHAR equip_slotVARCHAR qualityVARCHAR item_levelINTEGER required_levelSMALLINT max_stackINTEGER max_durabilityINTEGER bind_ruleVARCHAR max_affixesSMALLINT vendor_price_copp…INTEGER is_unique_equippedBOOLEAN created_atTIMESTAMP item_instances idBIGINT template_idBIGINT owner_player_idBIGINT stack_countINTEGER durability_currentINTEGER bound_to_player_idBIGINT bound_atTIMESTAMP affix_seedBIGINT created_atTIMESTAMP destroyed_atTIMESTAMP affix_definitions idBIGINT codeVARCHAR display_fragmentVARCHAR placementVARCHAR stat_keyVARCHAR min_valueNUMERIC max_valueNUMERIC allowed_item_classVARCHAR min_item_levelINTEGER weightINTEGER item_affixes idBIGINT item_instance_idBIGINT affix_definition_…BIGINT slot_indexSMALLINT rolled_valueNUMERIC applied_atTIMESTAMP applied_byVARCHAR containers idBIGINT owner_player_idBIGINT kindVARCHAR bag_slotSMALLINT bag_item_instance…BIGINT capacitySMALLINT created_atTIMESTAMP container_slots container_idBIGINT positionSMALLINT item_instance_idBIGINT placed_atTIMESTAMP trades idBIGINT initiator_player_…BIGINT partner_player_idBIGINT stateVARCHAR revisionINTEGER initiator_confirm…INTEGER partner_confirmed…INTEGER opened_atTIMESTAMP settled_atTIMESTAMP trade_items idBIGINT trade_idBIGINT offering_player_idBIGINT item_instance_idBIGINT stack_countINTEGER added_atTIMESTAMP mail_messages idBIGINT sender_player_idBIGINT recipient_player_…BIGINT subjectVARCHAR bodyTEXT attached_copperBIGINT cod_copperBIGINT sent_atTIMESTAMP expires_atTIMESTAMP read_atTIMESTAMP returned_atTIMESTAMP mail_attachments idBIGINT mail_idBIGINT item_instance_idBIGINT stack_countINTEGER claimed_atTIMESTAMP item_events idBIGINT item_instance_idBIGINT event_typeVARCHAR actor_player_idBIGINT from_player_idBIGINT to_player_idBIGINT from_container_idBIGINT to_container_idBIGINT stack_deltaINTEGER reference_typeVARCHAR reference_idBIGINT payloadJSONB occurred_atTIMESTAMP

Related database schemas