In fact, i wanted to have dms associated to cohort__main and origin__main
(and sample_main). The complete structure would be:
 
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)
);  

CREATE TABLE hsapiens_testconf__cohortdesc__dm (
 cohort_id_key int(10) unsigned,
 description_coh varchar(40) default NULL,
 KEY (cohort_id_key)
);
 
CREATE TABLE hsapiens_testconf__origindesc__dm (
 origin_id_key int(10) unsigned,
 description_orig varchar(40) default NULL,
 KEY (origin_id_key)
);
 
CREATE TABLE hsapiens_testconf__sampledesc__dm (
 sample_id_key int(10) default NULL,
 individual_name varchar(40) default NULL,
 KEY  (sample_id_key)
);
 
Would there be any work around to have this within the same dataset OR
having this in multiple datasets without having the user selecting those
datasets (ie, the linking in between the datasets would be done in
background)?
 
Thanks again,
Alex



  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Arek Kasprzyk
Sent: March 12, 2008 4:36 PM
To: Alex
Cc: [email protected]
Subject: Re: [mart-dev] Multiple subclassed tables associated to a main
within a dataset



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.

Reply via email to