AI 2008 SqlLite tables.

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Message
Author
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

AI 2008 SqlLite tables.

#1 Post by kLabMouse »

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
db.sql.zip
Draft DataBase SQL
(629 Bytes) Downloaded 538 times
bd.zip
Draft DataBase structure
(1.03 KiB) Downloaded 548 times

isieo
Kami-Sama Desu~
Kami-Sama Desu~
Posts: 195
Joined: 04 Apr 2008, 09:24
Noob?: Yes
Location: 31th Dimension
Contact:

Re: AI 2008 SqlLite tables.

#2 Post by isieo »

Its probably better if more people can give their input for this.

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: AI 2008 SqlLite tables.

#3 Post by sli »

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

Click
Human
Human
Posts: 39
Joined: 15 Apr 2008, 06:08
Noob?: Yes
Location: Russia, Velikiy Novgorod
Contact:

Re: AI 2008 SqlLite tables.

#4 Post by Click »

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.

Bibian
Perl Monk
Perl Monk
Posts: 416
Joined: 04 Apr 2008, 03:08

Re: AI 2008 SqlLite tables.

#5 Post by Bibian »

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 >_>

kali
OpenKore Monk
OpenKore Monk
Posts: 457
Joined: 04 Apr 2008, 10:10

Re: AI 2008 SqlLite tables.

#6 Post by kali »

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.

Click
Human
Human
Posts: 39
Joined: 15 Apr 2008, 06:08
Noob?: Yes
Location: Russia, Velikiy Novgorod
Contact:

Re: AI 2008 SqlLite tables.

#7 Post by Click »

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.

isieo
Kami-Sama Desu~
Kami-Sama Desu~
Posts: 195
Joined: 04 Apr 2008, 09:24
Noob?: Yes
Location: 31th Dimension
Contact:

Re: AI 2008 SqlLite tables.

#8 Post by isieo »

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.

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: AI 2008 SqlLite tables.

#9 Post by kLabMouse »

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).

isieo
Kami-Sama Desu~
Kami-Sama Desu~
Posts: 195
Joined: 04 Apr 2008, 09:24
Noob?: Yes
Location: 31th Dimension
Contact:

Re: AI 2008 SqlLite tables.

#10 Post by isieo »

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

Post Reply