Openkore.com

OpenKore Forums
It is currently 23 Sep 2018, 16:46

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: AI 2008 SqlLite tables.
PostPosted: 17 Oct 2008, 10:46 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1301
Some time ago Bibian and isieo where talking about migrating some tables from "tables" folder to SQLLite Database.

So. I've checked that Idea, and came out with a Tech Design and Draft Database file.

TechDesign:
DB <-- Main Holder package for all the databases (Text or SQLLite, no metter).
DB::CommandsDescription <-- Holder for all the Console Commands
DB::Directions <-- Holder for all the data (like "directions.txt")
DB::Elements <-- Holder for all the data (like "elements.txt")
DB::Emotions <-- Holder for all the data (like "emotions.txt")
DB::EquipTypes <-- Holder for all the data (like "equiptypes.txt")
DB::HairColor <-- Holder for all the data (like "haircolors.txt")
DB::Item <-- Holder for all Item's
DB::ItemTypes <-- Types of Item's
DB::Maps <-- List of all Map's
DB::Monsters <-- List of all Mob's
DB::NPC <-- List of all NPC
DB::Portals <-- List of All portals
DB::Sex <-- name say by itself (May-be a list of all free p*rn sites??? just joking)
DB::Skills <-- List of all Skills
DB::SkillsSp <-- Map of SP usage for every Skill

All those packages will have fixed API:
Get(ID or keyword) <-- Get a record
Set(hash) <-- Set a record
Import(string filename, bool rewrite) <-- Import FileName to DataBase
Export(string filename) <-- Export DataBase to Filename

See attachment file for DB Draft.
Please Note, that it need more Improvements to work fine.


Attachments:
File comment: Draft DataBase SQL
db.sql.zip [629 Bytes]
Downloaded 314 times
File comment: Draft DataBase structure
bd.zip [1.03 KiB]
Downloaded 318 times

_________________
Join our Team. Click here.
Image


Image
Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 25 Oct 2008, 15:34 
Offline
Kami-Sama Desu~
Kami-Sama Desu~
User avatar

Joined: 04 Apr 2008, 09:24
Posts: 196
Location: 31th Dimension
Its probably better if more people can give their input for this.

_________________
Openkore Svn Zips:
Image
Doing Stuff Better At CollectSkin.com


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 25 Oct 2008, 17:24 
Offline
Perl Monk
Perl Monk

Joined: 04 Apr 2008, 17:26
Posts: 811
My input is that SQLite is stupid and persistent databases through associative arrays are much easier. But then again since when did you guys care about my input? I mean It's not like I've been doing this kind of data access for-fucking-ever.

You guys seriously need to forward think about code maintainability. Not about making the code structure look pretty and organized (and enterprisey).

_________________
cs : ee : realist


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 25 Oct 2008, 17:27 
Offline
Human
Human
User avatar

Joined: 15 Apr 2008, 06:08
Posts: 39
Location: Russia, Velikiy Novgorod
table "item" need add column "price" and "weight" for autobuy.
It is necessary to add support of additional tables, as on different servers different npc, monsters, and deltaHP monsters.

_________________
[rofan.ru team] Image
https://sourceforge.net/users/lastclick/


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 25 Oct 2008, 21:00 
Offline
Perl Monk
Perl Monk

Joined: 04 Apr 2008, 03:08
Posts: 416
Click wrote:
table "item" need add column "price" and "weight" for autobuy.
It is necessary to add support of additional tables, as on different servers different npc, monsters, and deltaHP monsters.


Price is determined serversize and so is weight, we can't fill that data ourselfs cause it can differ on every server... so i would just not add those columns

ps: easier doesnt always mean better >_>


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 25 Oct 2008, 23:50 
Offline
OpenKore Monk
OpenKore Monk

Joined: 04 Apr 2008, 10:10
Posts: 474
I haven't seen the code implementation yet, but the way the proposed scheme is presented, it looks like some sort of database abstraction layer where we can plug in whatever kind of database we like. In fact, it's probably even possible to write another layer that will translate from SQL into some random access text file.

_________________
Got your topic trashed by a mod?

Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.

Have a nice day.


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 26 Oct 2008, 05:28 
Offline
Human
Human
User avatar

Joined: 15 Apr 2008, 06:08
Posts: 39
Location: Russia, Velikiy Novgorod
Is a server c in non-standard weight and the non-standard price of purchase of meat at standard npc? They on all servers identical, and each user can make for the server, the table. The price and weight is the important parametres for shortage avoidance zeny, overweight at purchase, bulk-purchases and cyclings at purchase.

_________________
[rofan.ru team] Image
https://sourceforge.net/users/lastclick/


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 26 Oct 2008, 10:12 
Offline
Kami-Sama Desu~
Kami-Sama Desu~
User avatar

Joined: 04 Apr 2008, 09:24
Posts: 196
Location: 31th Dimension
from what i know, it can recompile the current table files into sqlite and it can generate normal txt files again so that we can do version control.

_________________
Openkore Svn Zips:
Image
Doing Stuff Better At CollectSkin.com


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 29 Oct 2008, 04:28 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1301
I was reading
How do I redefine a builtin function, operator, or method?
and
overload

According, to what i've read, we could make it compatible with old style.
But that will be "Black Magic", and can cost us a very unreadable code (except that I dunno about sharing blessed variables that use overloaded operators).

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: AI 2008 SqlLite tables.
PostPosted: 30 Oct 2008, 04:36 
Offline
Kami-Sama Desu~
Kami-Sama Desu~
User avatar

Joined: 04 Apr 2008, 09:24
Posts: 196
Location: 31th Dimension
kLabMouse wrote:
I was reading
How do I redefine a builtin function, operator, or method?
and
overload

According, to what i've read, we could make it compatible with old style.
But that will be "Black Magic", and can cost us a very unreadable code (except that I dunno about sharing blessed variables that use overloaded operators).


well, if stuff is properly documented, we shouldn't have that problem.

i'll probably merge this with trunk after we got reviews from all the key people, then i'll release a beta version

_________________
Openkore Svn Zips:
Image
Doing Stuff Better At CollectSkin.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group