Antares

SQL suggestion

Recommended Posts

Hi!

 

It came to my mind, why do we use half txt half sql dbs while we could use either fully sql or fully txt db. Obviously the txt one exists already, so the only question is why not make it possible to use a fully sql based database instead of this mixed one?

 

What I mean is that for example items can be imoprted into SQL, but item_combo-s can't. Mob skills are in SQL, mercenary skills are not. And the list could go on. I was thinking that this is because some dbs are more like configs and not real transactional dbs, but as you can see even tables from the same kind are not handled consistently.

 

So what I propose is to convert every single table into sql file, and if someone chooses to use the server with sql support, then everything would be used from sql.

 

Why is this good?

-We can write advanced queries for NPC scripts, web pages, and administrative tasks, that work form only rA db, and we wouldn't need custom tables to store the missing informations, like map indexes/names, itemcombo infos ,etc..

-We can manage the database via a web admin site (if the database application supports.).

-Better performance (searching a B-tree/hash indexed database is always faster than iterating a plain text document.)

 

Why is this bad?

-Extra work

BUT!

If we can agree on a structure, let's say every txt based file should have it's sql vatiant's table structure written in the first commented line, then every txt could be easilly converted into sql with only one click. Wee need only one program to loop thru every file in the db directory. In previous duscussions it came into my knowledge, that we have an sql converter done, that can convert one file, and I posted my version as well, so we would need only these to be altered to automatically do all the files, we specify, let's say in a txt file.

Edited by Antares
  • Upvote 1

Share this post


Link to post
Share on other sites

agree, at least rA can provide the users if want to use SQL or TXT database (regardless how much memory usage if use full SQL or TXT or mixed)

Share this post


Link to post
Share on other sites

This is already being worked on. ^.^

  • Upvote 4

Share this post


Link to post
Share on other sites

This is already being worked on. ^.^

 

That's superb! Thanks :)

Share this post


Link to post
Share on other sites

is there an converter of sql to txt file ?? because my server is all txt file, and one of my old RO server offer me his server but his server is in sql and i want to use his items mobs etc but i dont know how to put the sql file? so im trying to convert it manually but it will take me weeks to finish the 500+ custom or more than 500 so anyone has suggestion

Share this post


Link to post
Share on other sites

A series of regex search & replace will most likely do the trick (or if you have access to a mysql, then a table export to csv, which is almost good). Personally, I don't know any reverse converter, but I think that is the easier way.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...