Original Post
Hi I am currently working on the database layout of a realtime-strategy browsergame engine. OpenMMOEngine ER-Model I would like to get some feedback on the layout and possible changes to reduce complexity and to make coding the stored procedures easier. A little description of the ER-Model: player_login: - holds the login data... - account specific data in general player: - holds game specific data - capital, score, ... alliance: - stores alliance specific data alliance_leader: - holds some flags that represent the members rights within the alliance such as chmod <rwx,rwx,rwx> population: - each player is associated with a native race, the first who claims a province will make is race the native race of a province. - if a province is occupied by a another player, the race of this player will be added to the native inhapitants, thus you can have an arbitrary number of races per province province: - stored 5 resource types (the use of these resources is optional, this is hardcoded for the sake of performance, allowing a 1,* relation between provinces and resources would cause a lot of trouble and add some complexity - holds its coordinates(x,y,z) e.g.: <continent,(x,y) coordinates on the map> building_type: - costs of 5 resource types - gatherrate of 5 resource types - time == construction time building: - 1,* relationship of province to building, which means you can have zero or more different buildings in your province where each buildingtype has amount many buildings unit_type: - describes costs and other attributes of units unit_stationed: - holds the number of units of a certain type that is stationed in one provinces and owned by owner - military_status describes their attitude upon attack of the provinces, thus allowing foreign players to support you in defense missions: - describe everything related to a mission - have 1,+ relationship to unit_on_mission unit_on_mission: - hold mission id,strength,unittypeid - (maybe add owner, so you can recover units that may be lost due to bugs?) Thats pretty much the entire database layout I have so far. There are things missing, like the diplomacy system and the communication system..., but those will be pretty similar to what I have above, thus I can add them once this here has been worked out Thx in advance