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

Home -> Community -> Usenet -> c.d.o.server -> Problem with simulation inheritance in Oracle8i

Problem with simulation inheritance in Oracle8i

From: Agnes Sauerer <agnes.sauerer_at_pentasys.de>
Date: Wed, 4 Aug 1999 11:11:44 +0200
Message-ID: <7o8vrj$spo$1@nixe.ISAR.net>


Hello,

I'm using Oracle8i, Release 8.1.5, on Windows NT 4.0, and I have problems with the simulation inheritance in Oracle8i.

From the Oracle8i Application Developer's Guide - Fundamentals Release 8.1.5

"Simulating Inheritance"
"The Oracle type model does not support inheritance directly.
In addition, inheritance can be simulated in Oracle. For example, you can use one of the following techniques to simulate inheritance:

* Subtype Contains Super-type
* Super-type Contains or References All Subtypes
* Dual Subtype / Super-type Reference


  1. Question about the methods "Super-type Contains All Subtypes"
    " The Super-type Contains All Subtypes technique hides the implementation
    of the subtypes and only exposes the super-type. To simulate inheritance, all of the subtypes for a given super-type in the design object model are created as object types. The super-type is created as an object type as well. The super-type declares an attribute for each subtype. The super-type also declares the constraints to enforce the one-and-only-one rules for the subtype attributes. All of the methods that can be executed for the subtype must defined in the super-type."

Could someone explain to me how I can implement one-and-only-one rules and perhaps give
me an example of the syntax used.

2) Question about the methods "Dual Subtype / Super-type Reference"

"In cases where the super-type is involved in multiple object-relationships
with many
for a multiplicity and the subtypes have specific relationships in the object model,
the implementation of inheritance is a combination of the two inheritance techniques.
The super-type is implemented as an object type. Each subtype is implemented as an object type. The super-type implements a referenced attribute for each subtype (zero referenced relationship).
The super-type also implements an or-association for the group of subtype attributes.
Each subtype implements a referenced attribute for the super-type (one referenced relationship).
In this way, both the super-type and sub-type are visible to the rest of the object model."

Could someone explain to me what a zero-referenced relationship (is it something
to do with Foreign keys?) is and perhaps give me an example of the syntax for it.

I'd also like to know what an or-association (and one-referenced relationship) is and
how to implement one.

Thank you in advance!

Agnes Received on Wed Aug 04 1999 - 04:11:44 CDT

Original text of this message

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