Re: Inheritance mapping in a RDBMS

From: Neo <neo55592_at_hotmail.com>
Date: 16 Feb 2004 10:16:19 -0800
Message-ID: <4b45d3ad.0402161016.745467c5_at_posting.google.com>


> What I am trying to do is, map an inheritance hierarchy in a relational
> database system.
>
> Example:
> Let's say you want to describe in a relational database, a collection of
> soundcarriers that consists of records, cassetes, dat-tapes en cds.
> (extremely simplified example, possible domain values between brackets)
>
> Should I use a couple of tables:
>
> soundcarrier (id, content [music, speech], label_description)
> record (id, material [aluminium, glass, vinyl], speed[33,45,78])
> cassete (id, length [45, 90, 120])
> dat (id, brand[sony, maxwell], sample_freq[44,48])
> cd (id, brand [sony, maxwell])

For an alternate solution using a small experimental db, see examples www.xdb1.com/Example/Ex102.asp and www.xdb1.com/Example/Ex004.asp XDb allows a thing to have multiple classifications, variable number of properties and inherit properties from it's classes.

For example, suppose thing1 isa soundcarrier and record. Then in effect, thing1.label and thing1.material will return values, where as thing1.sampleFreq won't since thing1 was not classified as a dat.

If you would like to set up an example db, please post some representative data. Received on Mon Feb 16 2004 - 19:16:19 CET

Original text of this message