mysql - need database model for online game -
i need database model online game:
the game should save characters have more or less type of character file:
every player has: -a username, password , bunch of ints/strings -a container "inventory" holds "items(id & amount)" in slot -a container "bank" holds items -a container "equipment" holds items -a friendslist holds longs (64 bit integers can converted usernames) -skills specified "id"(int) , "experience"(int)
my current idea use following tables: -players -inventory -bank -equipment -friends -skills
all containers id | amount | slot | owner_id
every player should have own "id" auto-incremented
but i'm not sure how primary keys & foreign keys system works in mysql , i'd prefer have professional instead of trying figure out things on own
you use layout suggested tables players, inventory, bank (although i'd put inventory , bank 1 , have boolean "isbanked" or w/e), equipment, friends, , skills. although think throw of them except skills players table , split string using string.split(","); in java. auto increment primary keys when creating table; pretty much.
Comments
Post a Comment