Global Database

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
slacker

Global Database

Post 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?
Whatever5k

Re:Global Database

Post 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.
Tim

Re:Global Database

Post by Tim »

You could provide system calls to set and retrieve information.
slacker

Re:Global Database

Post 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..?
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Global Database

Post by df »

make an public API that your apps call..

or use interbase, and have your apps link against the interbase library
-- Stu --
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Global Database

Post 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...
Post Reply