Thanks for the reply...
Maybe I am a little slow - the tables look like this:
create table customer (cust_No int not null, blah, blah, primary key(cust_no));
create table employee (emp_No int not null, blah, blah, primary key(emp_No));
create table address(addr_No int not null, addr_Owner int not null, blah, blah, primary key(addr_No), index(addr_Owner), Foreign Key(addr_Owner) references customer(cust_No), Foreign Key(addr_Owner) references employee(emp_No));
Am I on the right track?
Thanks again for your time and help!
Quote:
Originally posted by r937
see the thread Multiple Possible Parents
or see this article: Supertypes and Subtypes
your supertype is "entities which have addresses"
you have two subtypes: customer and employee
each of these subtype tables should have the supertype id as its primary key, as well as being a foreign key to the supertype table
then your address table can have a foreign key to the supertype table too
|