Recent

Author Topic: ZMSQL - TBufDataset SQL enhanced in-memory database  (Read 122606 times)

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #15 on: August 04, 2011, 10:01:21 am »
Testers, please check whether you can use MasterFields TStrings property from Lazarus IDE in design-time!

For some reason (can't see what is wrong) I am not able to use it (Lazarus 0.9.30/fpc 2.4.2, Linux), because it always crashes, though it works through code in run-time...

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #16 on: August 04, 2011, 10:57:55 am »
Regarding multiline support
BigChimp, gladly, but I am not sure whether JanSQL database engine is able to handle this?
The parameters set for SdfDataset in zmsql corresponds to the csv format that JanSQL uses...
Could you test it and patch zmsql-0.1.3 if it works?
Tatamata,

I'll give it a go, but don't know when I'll be able to get to it. I'll let you know.
I'll then also test if I can use the MasterFields TStrings property from Lazarus IDE in design-time.

Thanks,
BigChimp

PS: If you're using a version control system such as svn, git or mercurial, could you perhaps upload the code to github, bitbucket, google code or sourceforge? Or maybe even better, to Lazarus-CCR? This will allow people to easier generate patches etc.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #17 on: August 04, 2011, 11:56:01 am »
BigChimp, currently I don't use any :( But, after I finish referential integrity, I will put it to some of those you have enlisted.
As the matter affects, I would gladly leave this project to be coordinated by someone more experienced than me (I'm not a programer, I'm just a pharmacist)...
At this moment I just want to demonstrate proof of concept, to prove it is possible to create lite but real referential DBMS based on CSV, in-memory dataset and pure Lazarus/FPC, without depending on external C/C++ libraries.

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #18 on: August 08, 2011, 04:25:10 pm »
I am happy to announce new version of zmsql, version 0.1.4, that successfully implements REFERENTIAL INTEGRITY! :D
You can download it from:
http://www.4shared.com/file/1rrec25v/TZMSQL-014.html

A simple test project is provided inside the package folder and demostrates new features from zmsql 0.1.3 and 0.1.4:
  • queries with joined tables
  • master/detail filtration/synchronization
  • referential integrity (insert/update/delete)
  • parameterized queries

Referential integrity is basically implemented by new component TZMReferentialKey that represents a referential key. It connects master and slave dataset and defines linking fields and kind of referential integrity (set of (rkInsert, rkUpdate, rkDelete).
Important to note, master/detail filtratio and referential integrity are implemented as separate independent features.

From my point of view, this is successful proof of concept that it is possible to create real relational, SQL, embedded, cross-platform, in-memory database completely written in Pascal.

I have completed this package during my holidays that just ended today  :( and I'm afraid that I will not be able to continue intensive development in following weeks and months, since I am going to be very busy in my daily job...

Therefore, I would be very happy if there is an interested passionate experienced developer that could take-over this project and continue this effort 8-).

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #19 on: August 08, 2011, 05:29:00 pm »
tatamata,

Congrats on your achievements! Hope you had a nice holiday doing this...

I'm not really experienced, and haven't seen the code yet. I'll first have a look before getting back to you.

To be honest, my mind is spinning a bit with all the various mem datasets floating around, each with some deficiencies...  Apart from that, it's not easy to find documentation for a Delphi newbie like me...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #20 on: August 12, 2011, 03:03:46 pm »
Hello everybody. TZMSQL version 0.1.5 is here.
Can be downloaded from:
http://www.4shared.com/file/B8SDbOQ1/TZMSQL-015.html

Two small demo projects are included in the zip. First one demonstrates referential integrity, master/detail filtration, parameterized queries and difference between using predefined FieldDefs and FieldDefs created on the fly. The second one demostrates loading and saving to CSV table.

Improvements: ZMSQL now enables decimal separator to be chosen (new property in TZMConnection) for ftFloat field type. It does not influence default CSV save format, but only data representation.
Caution: Changing value of a ZMConnection.DecimalSeparator will change SysUtils.DefaultFormatSettings as well, so this will influence on the whole application!
If you leave ZMConnection.DecimalalSeparator empty, default format settings are going to be used

Added overloaded procedure, procedure SaveToCSV (pDecimalSeparator);overload; so that you can save a dataset with custom decimal separator. The regular SaveToCSV uses dot as decimal separator, because JanSQL database engine uses that format.

fredycc

  • Sr. Member
  • ****
  • Posts: 264
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #21 on: August 12, 2011, 04:22:48 pm »
Great job tatamata, clear and good examples  ;D

Thanks

Regards

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #22 on: August 12, 2011, 04:39:05 pm »
Thank you for comment, fredycc, I'm glad you like it!

Now, next issue is to enable ftAutoInc...

It is read-only in BufDataSet...
The question is where is it declared to be read-only? in db or bufdataset or...?
And how to override it to become editable?

From where to start? Any hints?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #23 on: August 13, 2011, 08:47:21 am »
Don't know much about ftautoinc but isn't it an automatically incrementing integer? In that case it isn't strange it's read only for the developer.
However, I think in the current bufdataset it just isn't initialised - at least it doesn't return any values when I read it.

FYI, on the fpc mailing list, there's been some effort to improve bufdataset:
http://lists.freepascal.org/lists/fpc-pascal/2011-August/029963.html
The patch mentioned doesn't include ftAutoInc in the list of supported fields in BufDataset...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

joseme

  • Full Member
  • ***
  • Posts: 128
    • Logosoft sistemas
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #24 on: August 27, 2011, 05:59:40 pm »
ZMSQL is very useful for portable apps. Thanks a lot!
un aporte a la comunidad:
http://pascalylazarus.blogspot.com/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #25 on: August 27, 2011, 08:01:31 pm »
I think I'm interested in this package, off to download...

* Need to wait for 500 seconds on 4shared, you really need a better place to upload. Choose google code or sourceforge instead, that could also promote Lazarus/FPC.
« Last Edit: August 27, 2011, 08:08:16 pm by Leledumbo »

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #26 on: August 28, 2011, 11:10:16 am »
Hi, Leledumbo.
Actually, I would prefer if someone experienced like you take-over this project and put it on sourceforge or what ever...and continue its development.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #27 on: August 28, 2011, 11:30:08 am »
Unfortunately I have no background in DBMS implementation, only in its usage (although it shouldn't be hard to learn). Maybe I could create a google code or sourceforge page, but that's all I can do for now. Anyway, you could remove binaries from the package, and create a separate download. This adds unnecessary size to the download.

99Percent

  • Full Member
  • ***
  • Posts: 160
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #28 on: September 02, 2011, 02:31:39 am »
This looks really interesting, with huge potential. I agree that binaries should be removed and the project put up on sourceforge or google code preferrably with git access.

Takeda

  • Full Member
  • ***
  • Posts: 157
Re: ZMSQL - TBufDataset SQL enhanced in-memory database
« Reply #29 on: September 02, 2011, 05:54:02 am »
...... Need to wait for 500 seconds on 4shared, you really need a better place to upload....

Yes, I feel the same too.. :(
Why Tatamata you not upload it into Mediafire or other fast place?? Or you can share it into Softpedia.. ;)

Regards,
Takeda.
Call me Takeda coz that's my true name.
Pascal coding using Lazarus => "Be native in any where.."

ƪ(˘⌣˘)┐ ƪ(˘⌣˘)ʃ ┌(˘⌣˘)ʃ

 

TinyPortal © 2005-2018