[Lazarus] Embedded database for Lazarus/Linux

José Mejuto joshyfun at gmail.com
Sat Jun 19 17:48:46 CEST 2010


Hello Lazarus-List,

Friday, June 18, 2010, 6:39:07 PM, you wrote:

JH> Of course, for huge data amounts of data you cannot avoid
JH> using a database but I would prefer if programmers think
JH> about performance a bit and not use databases for every
JH> small junk.

Its funny to see how many people fight in favor or against databases
(embedded in this case) without without taking in account the purpose.

Your approach about directory tree is fine, well is fine if your
memory is infinite which you can assume it usually. I had the same
problem, the directory traverse and I'm using an embedded database,
and yes, SQLite because two processes work with database in parallel,
one is a realtime browser about gathered information and the other is
the gatherer itself. Why database ? easy, I do not know how much
memory will be available when running the program, and I do not know
in advance how much data I must gather. I can not put my data in
memory and explore/update it because the software can gather 2-4 MB of
data or in the worst case a 10% of hard disks space, and in some
computers there are several terabytes of data storage. Ah! I can not
install a full fledged database server.

Is this an special case ? Yes, it is, but each one is an special
case.

Forefox bookmarks in SQLite seems overkill, but does anybody browse
looking for the reason of such change ?

--quote-
It stores both the bookmarks and the history as the database
with the help of SQLite. This is the reason why Firefox 3 is able to
add tags to the bookmarks and the awesomebar is able to list the
suggestions as per most visited links. This also enable Firefox 3 to
handle these requests very fast. SQLite database bookmark system was
added since Firefox 3 Alpha 5
--quote-

The other side effect is that now the private browsing could be
achieved simply by creating the database in memory. Same layout, same
everything, except database creation. Also if you delete your private
data, only one file must be erased and no one will be left behind (all
or nothing).

One problem, one solution. One with databases and one without.

-- 
Best regards,
 José





More information about the Lazarus mailing list