All:

Confession.

I jumped off V in mid-90s after several years of gainfully brute-forcing
masses of raw data from the R> prompt. Never found the time to actually
program anything or develop front end. Since then have produced schema
(in RB4K notation) for relaxation and sanity, but not one stick of code.

Now, a deep reservoir of of disjoint, un-Coddsian data threaten to
breach the FileMaker/Excel dam and swirl me and mine into non-normalized
oblivion. My arm-chair schema may not survive the deluge. But a man's
gotta try.

Interviewed a number of you (thanks all!), bought v8; been blown away by
the incredibly giving R-List culture and the deep, deep integrity of the
Razzak team, the product and the community you have built. But, holy
socks! So much to learn.

My plan is to work up to the point where - like, if ever - I can
contribute as cogently as do you all. In the meantime, try not to waste
anyone's time, and be ever thankful for my daily RBase-L fix. And risk
coming off as the smart-aleck-in-residence.

To business. 

A schema question regarding 'menage-a-many-many'.

Note: '[' ']' '[pk]''[fk]' ':' used for disambiguification only.

****** MODEL ******

Logical Relation #1:

   part <|---o>> part2assy <<o---|> assy

Physical Relation #1:

   part:[pk]partid <|---o>> part2assy:[fk]partid
   assy:[pk]assyid <|---o>> part2assy:[fk]assyid

...resulting in Compound Primary Key:

   part2assy:[pk][partid + assyid]

Ok, that's fine. But table 'part2assy' has a many-many relationship with
table 'fabprocess' through join table 'fabevent':

Logical Relation #2:

   part2assy <|---o>> fabevent <<o---|> fabprocess

Physical Relation #2: ...

****** Question: ******

a) Can a compound PK be at the 'one' end of a relationship?

   ex: part2assy:[pk][partid + assyid] <|---o>>
fabevent:[fk]umgeeIdontknow

or:

b) Should I create an auto-numbered stand-alone PK for part2assy

   ex: p2aid

   part2assy:[pk]p2aid <|----o>> fabevent:[fk]p2aid

...and take up the slack with 'AND' entries in the WHERE clause?

Thanks all

bruce/safesectors


Reply via email to