My Hierarchical Database Lite version

Blitz3D Forums/Blitz3D Userlibs/My Hierarchical Database Lite version

Hardcoal(Posted 2011) [#1]
I’ve created a database library that works hierarchically.
It loads itself to the memory from a text file.
and writes from memory to a text file.

You read data by writing a path like this. ReadData MyHouse/Size/
And you write data like that. WriteData MyHouse/Size/45

Until you save the database it is only in the memory.
It doesn’t write directly to the text file so you must do SaveDataBase in order to keep changes.

My pro version of this data base will support Multi Database
and many other features that are not included on the lite version.

Give it a try and tell me what you think.
any suggestions will be welcomed.

here is the link... http://www.hardcoal.net/MyProjectsDownload.html

Last edited 2011


RifRaf(Posted 2011) [#2]
looks good, you should add an encryption option for save/load


Hardcoal(Posted 2011) [#3]
thanks i will!
did you try it btw?
if you have more advices i will be glad to hear


RifRaf(Posted 2011) [#4]
I did,

I like it aside from using writeline to save the data.. You should imo store everything in a bank from the get go and store it in the format you want, then you can just use writebytes() to dump the entire database quickly.

see my old entry here
http://www.blitzbasic.com/codearcs/codearcs.php?code=2412

if you do something like that to just store the data in the right format on the fly then when users want a quick save they can just dump the database in a few milliseconds. The other upside is your database will be in a bank and anyone can make an interface DLL or whatever and you can pass the database back and forth easily.


Hardcoal(Posted 2011) [#5]
Ive add the encryption option and released an update version.

about your remark writeline issue, I will improve it in the future.
cheers

I looked on your tank game, very nice


Blitzplotter(Posted 2011) [#6]
This sounds interesting, its on my to do list to try out.


Guy Fawkes(Posted 2013) [#7]
I know this is an old thread, but I need some information. @RifRaf, I need to know if this is the way to go, in order to save & load your save file in memory itself, just like a console such as XBox360 & an offline game. I also need to know how to use a bank to accomplish this.