database

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
filo
Peon
Peon
Posts: 19
Joined: 01 Apr 2008, 18:56
Location: Czech republic

database

Post by filo »

Good day,
I look to the server data folder and TMW using XML databases, and my question is:
XML is better then MYSQL database?

Thanks for answer
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: database

Post by Crush »

XML files have the advantages over relational databases that they can be viewed and edited with a text editor and that they are easy to make in a way that is backward- and forward compatible.

SQL databases, on the other hand, are much faster to search when they aren't completely loaded into memory and much faster and safer to modify at runtime.

So we are using both. We use XML files only for static data like monster- and item stats while variable data like character stats is stored in an SQL database (The SQLite database tmw.db per default).
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
filo
Peon
Peon
Posts: 19
Joined: 01 Apr 2008, 18:56
Location: Czech republic

Re: database

Post by filo »

Crush wrote:XML files have the advantages over relational databases that they can be viewed and edited with a text editor and that they are easy to make in a way that is backward- and forward compatible.

SQL databases, on the other hand, are much faster to search when they aren't completely loaded into memory and much faster and safer to modify at runtime.

So we are using both. We use XML files only for static data like monster- and item stats while variable data like character stats is stored in an SQL database (The SQLite database tmw.db per default).
Ok thanks for your answer ;-).
jimao888
Peon
Peon
Posts: 15
Joined: 09 Sep 2007, 15:53

Re: database

Post by jimao888 »

At least use XML you don't have to worry about "lost connection to mysql server during query"
like MYSQL; By the way, did anyone know why I get this warning all the time?
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: database

Post by Crush »

The SQLite database used by TMWServ is embedded into the server application itself. So there is no connection which could be lost.

A database on an external server is however an option to reduce the load on the accountserver (while the world can be split up on multiple physical gameservers to improve performance there can only be one accountserver for each world). But in that case you have to make sure that the connection to the database server is fast and reliable, otherwise it could become a bottleneck and make the performance even worse.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
leeor_net
Novice
Novice
Posts: 180
Joined: 03 Feb 2008, 09:17
Location: Ohio, USA
Contact:

Re: database

Post by leeor_net »

Crush wrote:...(while the world can be split up on multiple physical gameservers to improve performance there can only be one accountserver for each world)...
(haven't tested this so I'm asking)

Does this mean that multiple game servers on different machines can be used to host different maps for the same world? E.g., gameserver1 hosts maps A, B and C while gameserver2 hosts maps D, E and F? Then the account server can tell the Client which gameserver to look for for each map?

If you've got documentation on this already (such as the Wiki, for instance), you can just direct me there.
- Leeor

"Oh, no thanks. I ate a boulder on the way in." - Shrek
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: database

Post by Crush »

That's exactly how it works.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
leeor_net
Novice
Novice
Posts: 180
Joined: 03 Feb 2008, 09:17
Location: Ohio, USA
Contact:

Re: database

Post by leeor_net »

Very cool. I imagine then it's a simple matter of defining the game servers within the server config files. Great! :) That will help to really lighten the load on the game servers.
- Leeor

"Oh, no thanks. I ate a boulder on the way in." - Shrek
Post Reply