[fpc-pascal] Cross-platform gdbm replacement

Alan Mead cubrewer at yahoo.com
Wed Oct 27 17:35:17 CEST 2004


I need to have some simple, cross-platform database functionality...
at a minimum, I need to be able to write a datafile that is easily
searched... kind of like a TStringList on disk.  I think dbm/gdbm
would suffice.  If it had the ability to hold multiple columns and
several indexes to those columns, that would be even better.  I've
considered something like MySQL but my needs are light-weight and I
need a permissive license so it can be included with a commercial
program and without having a seperate install/config.  And it needs
to work with FPC and Delphi.

I'll never need to use SQL or do a join.. the 'where' part will
always be a simple field value.  I will need to search a few million
records quickly.  Again, I need a way to write/rewrite the entire
datafile once and if the indexes get corrupted, I might need to
reindex.  But basically, I'll only be reading from this data.

I looked at Delphi's TDataSet class and descendants briefly but that
seems pretty complicated... I don't know if it's available in FPC.

Is this available in an existing package?  If not, I think it
wouldn't be more than a few nights hacking to make this degree of
functionality...  In fact, if it comes to that I'm torn between
starting from scratch with my own format or trying to adapt Turbo
Pascal code that can access existing file formats (e.g., Clipper).

Any thoughts or solutions would be appreciated.

-Alan




More information about the fpc-pascal mailing list