CONNECTION 1: N
→ Lesson 3: "owned" and nesting
Object Type and Its Instances
item_types
item_type_id PK
name 'Blade of Dawn'
base_damage 45
price 100
item_instances
instance_id Primary Key
item_type_id FK -> item_types
owner_id FK -> players
durability 73
the same for all instances
Every sword has its own story
Where should I keep my strength?
Is uniqueness required (owner_id, item_type_id)?
Instance-specific. Test: if the value changes for a single object but not for all of them at once, this is a property of the instance, not of the type.
No, if a player can have two identical swords. If you implement it—and ban it at the base level—the bug will be found within a month.
The inventory layout is determined by the game mechanics, not by a template: individual items do not stack; only the quantity stacks.