[Lazarus] Embedded database for Lazarus/Linux

Sven Barth pascaldragon at googlemail.com
Sat Jun 19 10:45:20 CEST 2010


Hi!

Am 18.06.2010 19:42, schrieb waldo kitty:
>> The Windows Registry is another (poor) attempt to provide structured
>> data storage, with only structured acces methods, but no description of
>> the structure itself.
>
> you found that, too, eh? :)
>

What do you mean with "description of the structure"?

Nevertheless the Registry is not that bad if you think about it: it's an 
data storage system that is provided by the operating system itself and 
thus available to all applications running on it.
Also - as the system itself uses it, too - it provides many information 
about the system and allows for finegrained configuration of your OS.
Another nice thing are permissions: You can - at least on NT+ systems - 
set the permissions for single keys (not values though) for specific 
users and groups. Try that with INI files (where the Registry originated 
from) or the simpler SQL databases. (I must admit though that I yet have 
to use that feature ^^)
If your application has the correct priviledges you can also load and 
unload private Hive-files (the Registry is saved in such files). You can 
use that for example to make your application portable: when your 
application is started it loads a private Hive into the Registry, uses 
the Registry methods to modify/read the data and then unloads it again 
when the application exits. (another feature I haven't tried/tested yet 
:( ) This might also work with applications from other developers... you 
just need to provide the Hive before the application is started, the 
application writes to the loaded Hive and after it terminates you unload 
the Hive again... Tada! Portable Registry-using application and less 
mess in the Registry :D (I should follow this idea sometime...)

To sum this up: The Windows Registry (and the NT architecture/design 
itself - excluding the Win32 subsystem :P ) is not as bad as most people 
see it.

Regards,
Sven




More information about the Lazarus mailing list