Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Clean Object Class Design -- What is it?

Re: Clean Object Class Design -- What is it?

From: Bob Badour <bbadour_at_golden.net>
Date: Mon, 3 Sep 2001 20:25:00 -0400
Message-ID: <obVk7.770$Vc4.134525028@radon.golden.net>

Craig Shearer wrote in message <3b92b65d$1_at_clear.net.nz>...
>
>"Bob Badour" <bbadour_at_golden.net> wrote in message
>news:YtTj7.600$Hl.123494514_at_radon.golden.net...
>>
>> Craig Shearer wrote in message <3b8e9bff$1_at_clear.net.nz>...
>> >
>> >"Sascha Bohnenkamp" <bonito_at_mevis.de> wrote in message
>> >news:3B8E1FC3.D4F6EED7_at_mevis.de...
>> >> > And
>> >> > for bi-directional associations, it enforces referential integrity.
>> >> which OODBMS does this and what is the kind of 'enforcement'?
>> >> Is it only a setting of the bi-link to NULL or more?
>> >> (rdbms forbid those actions or do a delete on cascade if you want them
>> >> to)
>> >
>> >The ODBMS I use (JADE) does this. You define inverse relationships
>between
>> >reference properties (either singular references or collections) on
>> classes.
>> >When you define the inverse, you also define whether the relationship is
>> >parent-child or peer-peer. In the case of a parent-child relationship,
if
>> >the parent object is deleted, then this will cascade delete the child
>> >object. In the peer-peer case, deleting the object at one side of the
>> >relationship will automatically update the other object's reference to
it
>> to
>> >null.
>>
>> Who says it should even allow the delete in the first place? Are all
>> references symmetric?
>
>If you're asking about Integrity Checking, then there is no formal
mechanism
>for defining this.

This gives a huge advantage to the relational data model then, which does have such a formal mechanism.

>However, it is possible to define code in the destructor
>for the class that would raise an exception under certain circumstances,
>thus preventing deletion by forcing the transaction to abort.

Since the DBMS must support multiple applications and multiple programming environments, what prevents your Java programmers from omitting an important constraint in the destructor that your Smalltalk programmers rely on?

>I'm not certain what you mean by symmetric references, but I'll hazard a
>guess. When references between classes are defined, you specify an update
>mode - effectively which side is manually maintained. So, if the
>relationship defines manual on one side and automatic on the other, then
the
>compiler will reject (with a syntax error) code attempting to update the
>automatic side of the relationship. It is possible, though, to define both
>sides as manual/automatic, meaning that whichever side is maintained
>manually, the other side will be automatically maintained.

Symmetric means the user can use the value as to identify referencers as easily as the referenced. All of the above manual and automatic crap are just more physical implementation details forced on users. Received on Mon Sep 03 2001 - 19:25:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US