TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Craig Swanson
from: Mario Semo
date: 1994-08-05 13:53:02
subject: C++ object databases = any suggestions?

Hello Craig,

On Jul 31 13:42 94, Craig Swanson of 1:202/354 wrote:

 CS> I'm thinking of buying a C++ object database library such 
 CS> as the "POET Object Database for C++".  There is an 

 CS> something similar?  If so, what are your thoughts about 
 CS> good and bad points of any such products?

a) introduction: The main problem in makeing something persistent, is that
programming language designer never thought of such a possibility. eg. File
IO is an language enhancement in RT-libs. The early tries to overcome this
problem were Network and later (early 70's) RDBS (on universities, early
80's commercial). The problem here is : There is a functional centric model
(code) and some data definitions and an independent data centric model (the
database scheme). There are indeed 2 different typemodels (one for
persistenz, one for the programming language.). 

b) state of the art : There are 2 different standard ways for makeing
things persistent in OO programming environment. Both are introduced by the
OMG (object management group). One is the persistent framework (an object
service for CORBA). So, buying the IBM implementation of CORBA for OS/2 you
will get an persistence framework for objects. For CORBA objects you define
your objects in IDL (interface defintion language) and you use the
persistence enhancements. (Note: The SOM Toolkit 2.0 contains only a small
implementation of the persist. framework. But we will see full versions
sometime.
Note: There will be a lecture on the COLORADOS/2 conference. Roger Sessions
(yes, the IBM OO guru itself) "Persistence Object Service for SOM:Many
DataStores, One Object Interface".

The other approch is introduced by a subgroup of OMG, which is called ODMG
(Object database management group). This group defined an standard
(ODMG-93) last year (V1.0) and an enhancement for the standard this year,
april (V1.1). This standard is now called ODMG-93:CURRENT BINDING. At the
moment they are working on the ODMG:FUTURE BINDING.

All of the OMG standards define an SOURCE MODEL for OODB (object oriented
DataBases). So, using the standard, you should be able to switch to another
OODB system just by recompile. BUT it DOES NOT define an OODB DataLeyout.
So, you cannot access data written with ObjectStore-OODB with POET-OODB.
(and so on).

PS: The 2 different stadards are related to 2 different ways of handling
distributed objects. Assume there is a central object server and many users
want to use objects the same time. 
method 1 (OMG-Corba, proxies) : The Data is stored only on the server.
Clients are using proxies to 'shadow' the class interface to their local
machine. The shadow just forward every call to the server. (This is what
distributed SOM is doing).
method 2 (OMG persistent framework). The object is duplicated to each
client. There are automatic update methods on the server, so each client
has up-to-date objects.

c) my comments: i would only buy a product of a someone who is member of
ODMG. I would NOT use any RDBS for makeing object persistent. I would NOT
use an OODB which is just a wrapper for an RDBS (eg. the RAIMA OO system is
build this way).
members of ODMG: SunSoft, ObjectDesign, Ontos, O2 Tech, Versant,
Objectivity,         HP, POET, Itasca, Intellitic, DEC, Servio, TI

here are some OODBs:

Ontos DB
   Ontos, Inc., FAX : (617) 272-8101
Objectivity/DB
   Objectivity, Inc. (415) 688-8000
ObjectStore
   Object Design, (617) 270-3509
O2
   O2 Technonlogy, BP105, 78153 Le Chesnay, Cedex, France
Itasca Distributed Object Database Management System
   Itasca Systems, Inc. (612) 851-3157
POET
   (Fax: +1 408 / 970 4630)

[Note: The IBM Lab in Vienna tested in 1991 different OODBs for their 
(OS2) WorkFlow manager product. [as i remember : ontos, versant,
ObjectStore]. After 1 year they decided to use ObjectStore.]

ObjectStore is very interesting from the technology point of view. It uses
debug info in .obj files to build the database dictonary. for all other
products you have to write C++ header files which are scanned by a
preprocessor. But, on the other hand, objectStore also has an unbelievable
price (runTime Fees).
For most prodcuts you have to pay RunTime fees for each installed version
of your product. For POET there are 2 different versions : The personal
version and the professional Version. The diff : The locking member funcs
for simultan access to a ODB by multiple clients. (eg. for distributed
objects on a server). The Personal Edition is RunTimeFee free. (but you
have to pay a oneTimeLicenze). There is also a 'noncommercial runtime
license for shareware and PD programs available by poet.

I have buyed POET 2.1 personal edition for evaluation usage mid juli and
wrote some remarks / problems to poet. 
(eg. there is a poet.lib compiled for single threaded, static bound CRT.
thats a problem for me).

How to make something persisent:

1st you write a .hcd file, containing c++ class headers.

eg:

persistent class person
{
 //...
 PTString name;
 PTDate   dateOfBirth;
 int      income;
 char     someThingElse;
 // ...
};

there is a precompiler which generates .hxx and .cxx files out of this .hcd
file. you use the .hxx files in your app and you have to link the .cxx file
to your app. 

main
{
 DataBase db(....);
 Person *p = new Person(....);
 Person->store(); // member function generated automatic by the precompiler.
 // ...
};

Note : of course, if youre class has an pointer to another class, both are
saved. If you read them in later, the other objects are read in also. (so,
its enough to store the root object of a tree, and to read in the root
object of the tree. There is also an OnDemand 'template' class. So, if
youre tree has onDemand link and right pointers, the elements are loaded
from DB only if you access the elements.

There is an article on Event Handling in OO DB's (in POET!!) in the C++
Report 6/94 (July/August 94). [page 24].

Literatur :

The Object Database Standard ODMG 93, Morgan Kaufmann. ISBN : 1-55860-302-6
  (this is V1.0 of ODMG-93, i dont know if V1.1 is published).
C++ Report Oktober 93 : The ODMG Standard
C++ Report June 94 : inside a OODB, (VERSANT)
The Journal of OO Programming June 94 : Querying OO DataBases (about OSQL)

Mario

--- 


* Origin: LC/32 Development Team-Vienna-Austria (2:310/14.11)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430
SEEN-BY: 711/807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 310/14 90 30 2490/1001 24/24 396/1 3615/50 229/2 12/2442
@PATH: 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.