[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FWD: Re: Object Relationship



On Wed, 26 Apr 2000, Kenny Go wrote:
> ------Original Message------
> From: Kenny Go <kennygo@mail.com>
> To: Falko Braeutigam <falko@softwarebuero.de>
> Sent: April 26, 2000 3:24:11 AM GMT
> Subject: Re: Object Relationship
> 
> 
> ------Original Message------
> From: Falko Braeutigam <falko@softwarebuero.de>
> To: Kenny Go <kennygo@mail.com>, ozone-users@ozone-db.org
> Sent: April 25, 2000 9:51:45 AM GMT
> Subject: Re: Object Relationship
> 
> 
> On Tue, 25 Apr 2000, Kenny Go wrote:
> > Hi!
> >
> > I have some questions about ODBMS:
> >
> > 1) How to build the object relationship like parent & child relationship
> in
> > RDBMS?
> ozone is an OO database which fully supports the Java object and programming
> model. So inheritence is done via subclassing.
> 
> What about Primary & Secondary key in RDBMS. How to implement it in ODBMS
> (or ozone)?

You don't need them in an OO environment. There are object identifiers but they
are not visible to the programmer. There is no API to deal with them. 

A primary key in the RDBMS world is used to reference to another 'object'. In
the OO world references are inherent part of the object/programming model.
There is no difference between ordinary references in Java and references
from/to persistent database objects. 

Consider the following: Two 'classes': Company and Employee - a one-to-many
relationship. It is clear how this would be done with an RDBMS. It is clear as
well, if we have to use pure Java to represent this scenario: Company holds a
collection (simple array, Vector, whatever) to store the Employees. And this is
exactly how this is done with ozone. Exactly the same code.

BTW: some of the OODBMS gurus do not use the word 'database' for OODBMSs but
'objectbase'. This is a very good idea IMHO to avoid this kind of confusion
that comes out of the idea to find all parts of RDBMSs also in OODBMSs just
because both are 'databases'. Should we change this on the web site?


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de