Page 1 of 1
Global Database
Posted: Sun May 04, 2003 8:04 am
by slacker
I was thinking about implementing a database that contained all sorts of data like the Windows Registry. How could i make this database available to all apps that would run on my OS?
Re:Global Database
Posted: Sun May 04, 2003 9:33 am
by Whatever5k
Well, you could store the database in a well known place (e.g. "/database" or "C:\System\DataBase32"). Every app could then OPEN this file.
Re:Global Database
Posted: Sun May 04, 2003 10:16 am
by Tim
You could provide system calls to set and retrieve information.
Re:Global Database
Posted: Sun May 04, 2003 10:41 am
by slacker
i want to put this data in memory because disk is too slow....but how would an APP know how to reference the data..?
Re:Global Database
Posted: Sun May 04, 2003 12:13 pm
by df
make an public API that your apps call..
or use interbase, and have your apps link against the interbase library
Re:Global Database
Posted: Mon May 05, 2003 12:30 am
by Pype.Clicker
slacker wrote:
i want to put this data in memory because disk is too slow....but how would an APP know how to reference the data..?
What i have is:
Code: Select all
lookup(<location>.*) --> returns an enumeration of all the keys under <location>
lookup(<location>.<key>) --> returns the value of a key
register(<location>.<key>,<value>) --> adds the key, value pair in the DB.
So the application knows it is looking for "system.device.disk.ide0.master.ID" and the database uses that name to retrieve the final information (in this case, an int) and returns it...