Re: vehicle to autoparts relationships

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 22 Nov 2006 18:13:12 -0800
Message-ID: <1164247992.479234.60720_at_k70g2000cwa.googlegroups.com>


Aloha Kakuikanu wrote:
> NENASHI, Tegiri wrote:
> > "Aloha Kakuikanu" <aloha.kakuikanu_at_yahoo.com> wrote in
> > news:1164244417.310045.85570_at_e3g2000cwe.googlegroups.com:
> > > NENASHI, Tegiri wrote:
> > >> You want to say the set containment join, is not it ? If you do,
> > >> there are two problems: 1) the performance of set containment join;
> > >> 2) the set valued attribute, or relation valued attribute, is not
> > >> realised by all the databases. One can have a separate relation in
> > >> the place of the relation valued attribute, of course, but then how
> > >> does one reference the relation from AssemblyParts with
> > >> assemblyPartNo ?
> > >
> > > No nested relations.
> >
> > Then how you create the schema ? Please show with tables: what is it
> > that assemblyPartNo references ?
>
> (referred to the rifle diagramm example above)
>
> table Parts:
> part# partName
> ------ -------------
> 100 - BARREL
> 102 - BARREL NUT
> 104 - BARREL EXTENSION
> 108 - BARREL RETAINER
> 110 - BOLT
> 112 - EXTRACTOR
> 114 - EXTRACTOR AXIS
> 116 - EJECTOR
> ...
> 194 - EXTRACTOR SPRING
> ...
>
> table AssemblyParts:
> assemblyPart# part# partName
> ----------------- ----- -------------
> 1 112 EXTRACTOR ASSEMBLY
> 1 114 EXTRACTOR ASSEMBLY
> 1 194 EXTRACTOR ASSEMBLY
> 1 112 BOLT ASSEMBLY
> 1 114 BOLT ASSEMBLY
> 1 194 BOLT ASSEMBLY
> 1 110 BOLT ASSEMBLY
> 1 116 BOLT ASSEMBLY
>
> In this particular example we see that
>
> {112,114,194} <= {112,114,194,110,116}
>
> in other words, BOLT ASSEMBLY includes EXTRACTOR ASSEMBLY.

"Find all the AssemblyParts that include EXTRACTOR ASSEMBLY" - a relational division query. It is essentially a hierarchical query "Find all the nodes ancestors"
in this model.

Who might have think that the two favorite Celko's topics are so closely related? Received on Thu Nov 23 2006 - 03:13:12 CET

Original text of this message