Re: case gurus??

From: Willy Klotz <willyk_at_kbigate.stgt.sub.org>
Date: Thu, 09 Sep 93 11:46:07 GMT
Message-ID: <747575167snx_at_kbigate.stgt.sub.org>


shiao_at_stsci.edu writes in article <1993Sep3.103648.1_at_stsci.edu>:
>
> A must belong to one and only one C
> C may have one or more A's
>
> A has a uid made up of a one attribute called "a_id" and its relationship
> to C.
>
> C has a uid made up of one attribute called "c_id".
>
> B has a uid made up of one attribute called "b_id".
>
> B is the super-type for C.
>
> When performing the following:
>
> 1. fast path table mapping, generating only the A and C tables.
>
> 2. Default database design.
>
> The resulting attributes for A are "A_id", "C_shortname_B_id", and
> "C_shortname_B_id_AC_belong_to".
>
> My questions are???
>
> 1. Why did it use the uid of the supertype(B) when one was defined for the
> subtype (C).

Because C is unique only in its supertype B.

>
> 2. Why did CASE put two attributes in which have exactly the same data in
> them. One to resolve the foreign key and the other to resolve the
> relationship and subsequently the uid for A.
> I am a little confused as to what is happening, any clarification
> would be greatly appreciated. Should I just delete one of the attributes
> later on and not worry about it.

You can indeed delete one of the attributes. But be sure to change the foreign keys.

>
> But the first question still remains.
>
> According to the printout generated by the "default database design"
> this is not the way it should work (see below text from printout, #5).
> I have called ORACLE on this and am still waiting to get an explanation.
>

According to ORACLE, the implementation of super- and subtypes is not very good. My approach is to have nearly no supertypes, I use them only if I want to "group" some data. But then, I have no attributes in the supertype.

Willy


Willys Mail     FidoNet   2:2407/46    Mail Only System
                CIS: 100020,3517       USR Courier HST dual standard
                willyk_at_kbigate.stgt.sub.org
                ->   No Request from 06.00 to 08.00 <-
======================================================================
Received on Thu Sep 09 1993 - 13:46:07 CEST

Original text of this message