On 12-Mar-08, at 3:40 PM, Alex wrote:
Hello,
Hi Alex,
I am wondering if it is possible to have more than one subclass
(main) table associated to a single central main table within the
dataset but not associated amongst themselves.
Here is a sample schema:
CREATE TABLE hsapiens_testconf__sample__main (
sample_id_key int(10) default NULL,
KEY (sample_id_key)
);
CREATE TABLE hsapiens_testconf__cohort__main (
sample_id_key int(10) unsigned,
cohort_id_key int(10) unsigned,
KEY (cohort_id_key),
KEY (sample_id_key)
);
CREATE TABLE hsapiens_testconf__origin__main (
sample_id_key int(10) unsigned,
origin_id_key int(10) unsigned,
KEY (origin_id_key),
KEY (sample_id_key)
);
Thanks,
Alex
the main tables form a chain of 1: m relationships and each of the
subclasses has a foreign key from all the superclass tables. Based on
the defined keys in your talbes
i can see two possible combinatons of mains and one dm:
sample and cohort mains + origin dm
or
sample and origin mains and cohort dm
(for dms you only need one key)
a.