views:

128

answers:

2

This question always arises in my mind when I play simulation sports games.Football Manager for example has tons of stats and information about almost everything in the world of football. Countries leagues players regional players and so much more....DO they use database or files if database how do they model it....relational or object based

+2  A: 

Databases typically are files. They just embody a particular way of writing and reading to the file. So it's more about how you choose to access and structure your data.

Often game developers don't use traditional DB technology because they are more used to holding the whole data set in memory and querying it algorithmically rather than forming structured queries. This is changing in certain areas, but it's still done on a case by case basis. Traditional relational databases necessarily carry a degree of overhead and are quite slow and unwieldy in the wrong hands. Therefore many game developers, having already mastered other methods of handling the data in their domain, don't have the time or inclination to become 'the right hands'.

Kylotan
A: 

Databases are slower than in-memory storage, but they have the advantage of being reliable. I'm not sure if there's much difference between a file and a database, except that databases are excellent at accessing information that would probably be stored in different files (if you went with a file-based approach). For instance, if you wanted to compare teams in your football manager, it would be faster to have a database get the specific information you need across teams than it would be to open up a separate file for each team, read it in, extract the information, then compare--- databases are built/optimized for doing stuff like that!

Note that you can have a database and also use the database stuff in memory. You can store things in a database, then load it into memory when needed. This is particularly true of a game, where likely you wouldn't need all of the opponent data in memory at once (only the data for the opponents who are playing right now).

Denise