Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / DBData Plugin - Simple Data Storage

Author
Message
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 14th May 2004 20:45 Edited at: 14th May 2004 20:47
Hello all! I've been working on a small DLL plugin for DBP for a couple of days called DBData. This plugin allows DarkBASIC Pro programmers the ability to create and modify database files for their projects.

These database files are a custom format (nothing special), which stores multiple tables with data in one file.

An example of creating a database:


Code to access the database is also simple. The DBData system is not quite done (thus the WIP posting), and features include:

- Creating databases
- Multiple tables per file
- INTEGER, FLOAT, and STRING field types
- Moving back and forward through records (bi-directional)
- Deleting records
- Adding records

Planned features:

- Search and filter table capabilities
- Table indexes for faster record searches

You can download the DLL from http://www.mighty-atom.com/d-zone/downloads/DBData.zip. Simply copy it to your CompilerPlugins-user directory.

Screenie:


Here is the code that produced the program you see above...



Tell me what you guys think!

Visit http://www.mighty-atom.com/d-zone for the Transform-i scripting engine project.
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 15th May 2004 00:50
Looks interesting and very usual. Could be useful to those making rpgs as you demonstrated in your screenshot.

[href]www.vapourhost.com/~flyer[/href]
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 15th May 2004 01:13
Quote: "and very usual"


??

Its pretty simple, but effective in that it makes the storage and retrieval of game data fairly simple. No big deal...

It is, however, free. And I'll give the C++ source code to those interested...

Visit http://www.mighty-atom.com/d-zone for the Transform-i scripting engine project.
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 15th May 2004 03:58
yeh well simple is effective heh.

[href]www.vapourhost.com/~flyer[/href]
zao420
20
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 25th May 2004 12:21
looks nice.. might use this for my game.

TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 25th May 2004 19:06
Cool. Thanks. Let me know how you use it...

Visit http://www.mighty-atom.com/d-zone for the Transform-i scripting engine project.
zao420
20
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 26th May 2004 04:18
I am thinking of useing it for my invitory system. maybe even more. once i start playing with it more.

Jimmy
20
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 26th May 2004 09:51
What type of database is this? I think rather than commands you could just allow SQL queries SQQLLSLQLSQLQLLLSQLLLSLQLLSQLLSQL

*pukes*

----

http://www.dbspot.com/ - Free website hosting. Fast and reliable... probably.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 26th May 2004 18:14
Just a custom flat-file format, a single file for multiple tables. I didn't really intend on creating the SQL query syntax. I do, however, plan on creating the ability to do *basic* filters with simple search criteria. I.E. Something like FILTER DATABASE TABLE 1, "MasterInventory", "Quantity > 2" which would filter the MasterInventory table to records where the quantity field has values greater than 2.

The benifit of using this is that you don't have to install an actual SQL SERVER (i.e. MySQL) or buy Access, or even spend the time writing the code to create files to store and retrieve data.

Of course, any thoughts are welcome.

Visit http://www.mighty-atom.com/d-zone for the Transform-i scripting engine project.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th May 2004 19:09
Looks good. It's an ideal alternative for small data files without having to delve into SQL and all the baggage it brings with it.

I'm just building a menu system, I might try using your DLL to store the menu data when you've got a little further with it. The menu system has the equivalent of 2 tables, 10 - 12 fields each per record, and I imagine up to 100 records. I'm currently using an "ini" file.

BatVink
http://facepaint.me.uk/catalog/default.php AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 26th May 2004 20:26
Glad to see it can be of some use I've just updated my website with a section for it (finally) and a download for the DLL & Doc as well as a sample project source download.

The next thing I'm going to implement is the ability to sort the results on a given field.

Visit http://www.mighty-atom.com/d-zone for the Transform-i scripting engine project.
Rpg Cyco
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Australia
Posted: 27th May 2004 02:19
Was waiting for the docs, thanks.

l8ter

Rpg Cyco

TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 27th May 2004 18:28
Yeah, the docs are still pretty crumby, but I'll
update them when I can. "Real-Life" work has got
me pretty busy...

Visit http://www.mighty-atom.com/d-zone for the Transform-i scripting engine project.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 2nd Jun 2004 18:45 Edited at: 2nd Jun 2004 19:04
Ok. Finally got a few spare minutes to work on this. Added the missing capabilty to edit existing records . I've begun implementing the ability to filter records by simple expressions. I'm not sure how complex I want this to be.

Anyone have an opinion? Should I allow fairly complex filter expressions (i.e. mathmatical and multiple conditions), or only allow simple expressions.

Example of complex:
"ItemPrice > 4 + 10 AND Quantity < 4"

Example of simple expression:
"ItemPrice > 14"

Any suggestions?

P.S. I'm updating the docs and website right now, and I'm producing a better example application for download. They'll be up in a little while.

*edit* I've uploaded the updated DLL/DOCs download on my website. I'll be posting a new and improved example when I am done making it.

Visit http://www.mighty-atom.com/d-zone for the Transform-i scripting engine project.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Aug 2004 16:10 Edited at: 18th Aug 2004 16:12
Quote: "What type of database is this? I think rather than commands you could just allow SQL queries SQQLLSLQLSQLQLLLSQLLLSLQLLSQLLSQL

*pukes*"


I hate SQL. I'm stuck programming with that crap all the time.

Are these databases stored and accessed from memory or harddisk?

"eureka" - Archimedes

Login to post a reply

Server time is: 2024-05-20 10:59:12
Your offset time is: 2024-05-20 10:59:12