List:General Discussion« Previous MessageNext Message »
From:abrea Date:July 7 2005 9:44pm
Subject:Re: Another generalization hierarchy problem
View as plain text  
Thanks to all for you help and time.
After reading to replies, I think that perhaps a clean way of dealing 
with individual and company customers in a single table could be to 
leave them out of the "parties" tree altogether and relate them to 
the "parties" table without a generalization hierarchy, but one-to-
one from a "customers" table. For instance:

1) PARTIES TREE:
Parent:
PARTIES Attr: id, type

Subtypes of Parties (complete and disjoint):
INDIVIDUALS Attr: id, firstname, lastname, sex, language
JURENTITIES Attr: id, name, type

Subtypes of Individuals (complete and overlapping):
PERSONAL Attr: id, birthday 
BUSINESS Attr: id, title, specialization

2) CUSTOMERS TREE:
Parent:
CUSTOMERS Attr: partyid (references parties), taxid, billingaddress

Subtypes of customers (complete and overlapping):
SUBSCRIBERS Attr: partyid (references parties), startdate, enddate
SERVICE1USERS Attr: partyid (references parties), xxx
SERVICE2USERS Attr: partyid (references parties), xxx

3) OUTSIDE BOTH TREES:
PHONES Attr: id, number, areacode (relates M-M with parties)
ADDRESSES Attr: id, street,etc (relates M-M with parties)
EMAILS Attr: id, email (relates M-M with parties)
URLS Attr: id, url (relates M-M with parties)
The three would need an associative table separating them from the 
parties table, with a composite key

Am I going wrong somewhere?

Alberto
Thread
Another generalization hierarchy problemabrea7 Jul
Re: Another generalization hierarchy problemSGreen7 Jul
Re: Another generalization hierarchy problemabrea7 Jul
Re: Another generalization hierarchy problemabrea7 Jul
Re: Another generalization hierarchy problemSGreen7 Jul
Re: Another generalization hierarchy problemPeter Brawley7 Jul
Re: Another generalization hierarchy problemabrea7 Jul
Re: Another generalization hierarchy problemabrea7 Jul