[Lazarus] Embedded database for Lazarus/Linux
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Fri Jun 18 09:36:48 CEST 2010
waldo kitty schrieb:
> i'm (still) trying to figure out why one would have an embedded database
> with multiple embedded apps attempting to talk to it... concurrently or
> otherwise... i would think that any kind of concurrent multiple access
> needs would be better served by a (dedicated?) database server...
ACK. It's easy to have multiple apps accessing the same data base (of
whatever kind), e.g. multiple Lazarus IDE instances...
> i still find it amazing, though, that in today's world, so many opt to
> use a sql database of some kind even for smallish projects where a nice
> simple self-designed binary data file would suffice... in many cases, it
> is akin to swatting a fly with a hydrogen bomb ;)
What are the alternatives? If you already had to update a binary file
format, for required extensions, you'll know about the problems with the
conversion from the old to the new format, and with the synchronization
of the load and store procedures. A database should do all that
automatically, whenever the common model is updated.
XML files are no real alternative, they typically lack a "TOC" with all
available or mandatory entries, that have to be specified and respected
in application code. Of course there exist *means* to describe the XML
content structure, but that feature is based on very complex descriptions.
The Windows Registry is another (poor) attempt to provide structured
data storage, with only structured acces methods, but no description of
the structure itself.
That's why "traditional" (relational) databases, with a number of named
tables and entries, IMO offer both a simple structure definition, while
leaving much room for common or special (SQL) statements for data
retrieval and storage.
In so far a XML solution will more resemble the hydrogen bomb, compared
to a simple DB solution. A database system is not necessarily a big
piece of code, as shown by the embedded solutions, and the SQL query
features can be applied as another layer on top of any concrete DB model.
DoDi
More information about the Lazarus
mailing list