[Agendaware-dev-db] Design
Status: Inactive
Brought to you by:
zacklink
|
From: Agyani <ag...@my...> - 2001-11-27 18:58:58
|
Proposed Database Design: An abstract class containig only pure virtual methods is used as the = base class for all methods relating to db. The db access class extends = this base class and provides all the necessary implementation. Data is = shared between the server and the db class by way of structures(struct = user etc), these structures have been defined in a different header = vardef.h (VARiousDEFinitions). The server will work only with the = methods provided by the Abstract base class, it creats an object = Database db =3D Postgres(info) (where info is a structure holding data = to estabils a connection to the db) and now works with the interface = methods. For other db's you only extend the base class and replace = relevalt include file and Database db =3D Oracle(info) and = recompile.This is what presently is on and has been to some extent = coded(skeleton ready). Ideas/Comments Required: Thinking on the lines of Java refelection api, if we could come up with = some way of dynamicaly loading/initilazing the Database object in the = server with the relevant db class by just changing the name of the db in = server.conf ? Thought: We could have the class name and file name just the same and lookup for = the relevant class pointed by the name stored in the server.conf, then = create an object and pass it over to the server. This all should be done = by a different class in between the server and the db class something = like dbclassloader. rahul |