Game Development Community

Wich database system?

by xardias · in Torque Game Engine · 01/15/2006 (11:51 am) · 9 replies

Hello,

we plan to use a database to store gamedata. I am used to use PostgreSQL and realized, that most of you are using MySQL.

Are there specific reasons to prefer MySQL over PostgreSQL in game development, apart from religious aspects? ;)

I saw that there is no native extension directly for PostgreSQL, we would have to use ODBC. Does ODBC access to the database create much overhead in contrast to direct native access?

greetings
xardias

#1
01/15/2006 (1:11 pm)
Can't help with PostgresSql using MySql personnaly. But using ODBC does not add too much overhead. In fact one great atvantage with ODBC is that you can switch database (example from MySql to Oracle) without having to rewrite most of the DB access in your application.
#2
01/16/2006 (10:42 am)
We had much success with Postgres, and prefer it over MYSQL mostly due to additional functionality.

We used an ODBC layer, and Postgres as backend, had it up and running in a week or two (partial time) with a pretty experienced linux guru (dedicated linux servers), and then had some pretty enhanced persistence of every game object in a couple of months (again, partial time) with an average to good db engineer.

No reason at all to use one over the other in regards to Torque itself, go with what you know for sure.
#3
01/16/2006 (1:19 pm)
Something else to consider is cost. PostgreSQL is free even for commercial use. I believe (and I may be wrong) that you are supposed to purchase a license for MySQL if you use it for commerical use. I'm sure a lot of people are using MySQL with their games because there is a resource available on the GG site that describes how to implement it.

Steve
#4
01/16/2006 (2:00 pm)
I was just wondering I am using a bit of openforwrite in my game to save files what are the downsides to this?
#5
01/16/2006 (2:27 pm)
Master Treb,

I would think what you use to store your data depends on the scope of your game. The game the OP Dennis is making is probably some kind of persistent world and has quite a bit of data to store. For small single player games you could get away with various means to write your data to disk. For a game like that a full blown database is overkill.

One method I'm considering for the game I'm working on is using and embedded database (not relational) called BerkeleyDB. I use it at my day job. Another embedded type of database is gdbm (GNU DB). These options require C/C++ code changes though.

Steve
#6
01/16/2006 (2:31 pm)
Thanks in this case I believe I may be using it in the right fashion.
#7
01/16/2006 (2:38 pm)
For my game I needed to make it a little hard for local users not cheat. Keeping stuff in plain text files is too easy for them to look up the data they need to cheat. Storing in some DB format makes it a little more difficult, but if they are determined to get at it they will no matter what you do.

I guess its like real life. If you take a few steps like locking your doors and windows and maybe putting a "Protected by such and such" alarm sign up the crooks will walk next door and try an easier house. Unless they really want something inside that is :)

Steve
#8
01/16/2006 (2:49 pm)
Gigabase!
#9
01/16/2006 (3:00 pm)
Hmm, I haven't heard of Gigabase until now. It does warrant a closer look though.

For my application though it still has too many features.

BerkeleyDB (http://www.sleepycat.com/products/bdb.html) isn't a relational database.

There is no SQL in BerkeleyDB very lightweight.

Steve