Jump to content
  • Advertisement
Sign in to follow this  
Unreal

PostgreSQL VS MySQL for MMORPG

This topic is 4650 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello ppl! I am planning to start Developing a MMORPG.. This period i am searching and collecting information about the tools/programs/libs i will use and stuff.. I was looking for SQL today... so.. the question is.. "PostgreSQL or MySQL?" Forget about the licence.. As I see MySQL is a little easier to handle, has more tutorials and stuff.. but PostgreSQL fas more features.. The problem is that I can't find benchmarks to compare this two SQL servers. So the new question is: "PostgreSQL or MySQL? Which is better for a MMORPG Game with a lot of players(1000-2000 maybe more :P ) and a big virtual world like Lineage2 or WoW?" The server more possible is to run on a Unix-like OS (Linux,Unix,BSD,Solaris). thanks for your time!

Share this post


Link to post
Share on other sites
Advertisement
It's really of no consequence. I have no idea what scale you're planning on doing things on, but here's a tip from me (Disclaimer: I have never developed a MMORPG and do not intend to)

- Do not make a world bigger than your server's RAM
- I.e. the object and game data, obviously graphics / sound resources that don't affect gameplay, don't count. The server won't need them.

Say you have 2G of RAM in your server(s) (not much these days), just make sure that your entire data set is less than that, and you're absolutely sorted.

You can keep everything in RAM and not worry about doing any queries whatsoever on the DB which you use as your backing store (effectively).

So you won't ever really do anything to it.

If you do the sums, you'll realise that you can probably keep a moderately large MMORPG in ram anyway.

Mark

Share this post


Link to post
Share on other sites
I would say that it depends on what you plan to do with the database, and how familier you are with databases in general. In my opinion, I would use postgres, for a few reasons:

1) referential integrity.
-this is a biggie, database fields that refer to other fields, making sure that they contain valid data.

2) Rollback
-this is the database version of "undo" If your data gets corrupted somehow, or something was accidently deleted, sometimes its handy to be able to "undo" the insert, update, delete etc that caused the problem, rather then restore the database from a previous backup.

From my understanding, mySQL is a little faster then postgres, but the features you -may- use in the future make up for it. Also, I believe mySQL in it's most recent versions has started to implement some of these features, but I dont know if I would trust -my- game server's data to them yet.

It's very true that postgres doesn't have as many tutorials as mySQL, but once you learn the basic SQL syntax thats common to many many databases, its very trivial which one you learned on, aside for some fairly advanced (granted, useful) features.

Hope this helps some! (anyone, feel free to correct me if I'm off here!)

Share this post


Link to post
Share on other sites
We use MySQL for our hobby MMORPG project and we haven't had any major issues. I've never used PostgreSQL myself so I am probably a bit one sided :). We've had a few corrupted tables but the repair tools that came with MySQL fixed them.

markr does raise some good points. When our server starts up a lot of data is read from the database and cached into memory, this way we limit database hits. Normally database hits occur when a player logs in/out, some sort of guild change, items changes ownership, stuff like that. Periodically saving current players to database is also not a bad idea.

I think the 'big players' use something like Oracle but the costs are pretty high for a hobbiest or starting developer. We use MySQL at my day job and it's running in a production environment with many, many access and haven't had a problem yet.

You can see a bit of our database layer here. Our database system is a plugin ( ie dll ) so we can implement different databases without having too much of a headache. We've just stuck with MySQL for now.

Share this post


Link to post
Share on other sites
PostgreSQL is Oracle for open source.

As Rhalin said - PostgreSQL has more features and implements more of the SQL standards than mySQL - referencial integrity etc. mySQL is quicker because it is a light weight DBMS.

If you're just planning on having lots of tables with references maintained in your application you may as well use mySQL. If you want to use the extra features - Postgres.

Share this post


Link to post
Share on other sites
Just to clarify, MySQL does have some referential integrity functionality. You may have to choose the appropriate table type (eg. InnoDB) to enable this.

Share this post


Link to post
Share on other sites
I worked on a commercial MMOG that shipped using MySQL; I assure you the capabilities of MySQL DB is the least of your worries, as long as you're smart about how you cache data, and how you store large binary data-chunks (such as collision meshes, hightmaps, etc).

Good luck,

Allan

Share this post


Link to post
Share on other sites
Quote:
Original post by superdeveloper
Anyone know if and SQL server come with WinXP Professional?


Nothing that comes in the box no.

Share this post


Link to post
Share on other sites
you can download Microsoft SQL Server 2000 Desktop Engine (MSDE) for free, of course it is not as good as buying SQLServer but it is compatible and redistributable. this means you can play with it all you like. i don't know if it would be able to handle a full-on MMORPG (it is, after all, a trimmed down version) but you can develop with it, and then when you get those millions of dollars to start running your MMORPG you can budget another $5000 to get the full version ;)

also, this is being replaced with SQL Server 2005 Express, which is in beta right now (along with the 2005 full version). i hear it is nifty as hell (and also free), but i generally avoid betas and let everyone else deal with the bugs.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!