Jürgen Hestermann schrieb:
Forgive me my naivity (I never used a database yet)
I'm also not a DB power user, but...
but just as an example: If you want to read a complete directory branch
(with thousands of files and directories) every 5 minutes in a loop and
want to store this information together with other information (like
date/time
of first appearance) at the end of each loop so that it's available even
after a reboot, would you use a database for this?
If yes, how would the tree structure be defined in the database?
Depends ;-)
In your example...
I just did this using a simple binary file and it was quite easy to do
and it's speed is amazing. If my data changes, I simply delete the file
and start from cratch.
... I'd not bother with storing the results at all. Databases become
extremely important when you can *not* simply rebuild your data from
scratch.
If I see the delays that applictions like Thunderbird
produce when simply moving an email to another folder (the hard disk
spins for a minute or so) then I am happy that I never was forced to use
a database.
That's because TB does *not* use a database, at least not standard DB
that is designed for fast transaction processing. Instead TB holds all
information in one file per folder, so that moving a piece from one
folder to another one means to rewrite two such (huge) datafiles.
You see how important the right use of the right storage model is in
practice?
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus