Unique constraint in natural diversity module

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Unique constraint in natural diversity module

Naama Menda
hi,

does anyone know why there was a request to have the experiment_id unique constraint on nd_experiment_phenotype ad genotype tables?

There was a request recently to drop this 1-1 relationship, and I can't figure out why it was requested in the first place .

thanks!
-Naama


Naama Menda
Boyce Thompson Institute for Plant Research
Tower Rd
Ithaca NY 14853
USA

(607) 254 3569
Sol Genomics Network
http://solgenomics.net/
[hidden email]

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: Unique constraint in natural diversity module

Bob MacCallum
Wasn't it just that if you are measuring two phenotypes, say leaf size and fruit weight, then you'd use two nd_experiments (each linked to the same stock) because you need two nd_protocols to describe the two assays?

We have no objections to relaxing the constraint though - I'm sure there are situations where 1 to many is needed.


On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]> wrote:
hi,

does anyone know why there was a request to have the experiment_id unique constraint on nd_experiment_phenotype ad genotype tables?

There was a request recently to drop this 1-1 relationship, and I can't figure out why it was requested in the first place .

thanks!
-Naama


Naama Menda
Boyce Thompson Institute for Plant Research
Tower Rd
Ithaca NY 14853
USA

(607) 254 3569
Sol Genomics Network
http://solgenomics.net/
[hidden email]


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: Unique constraint in natural diversity module

Naama Menda
hi Bob,
you could store the 2 measurements with 2 different experiment ids, or use the same experiment for both.
Someone at some point asked for the 1-1 constraint, and I can't remember why.
I think it's best to have users enforce this if needed on the software level.

Any other thoughts?

-Naama



On Fri, Oct 22, 2010 at 5:53 AM, Bob MacCallum <[hidden email]> wrote:
Wasn't it just that if you are measuring two phenotypes, say leaf size and fruit weight, then you'd use two nd_experiments (each linked to the same stock) because you need two nd_protocols to describe the two assays?

We have no objections to relaxing the constraint though - I'm sure there are situations where 1 to many is needed.



On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]> wrote:
hi,

does anyone know why there was a request to have the experiment_id unique constraint on nd_experiment_phenotype ad genotype tables?

There was a request recently to drop this 1-1 relationship, and I can't figure out why it was requested in the first place .

thanks!
-Naama


Naama Menda
Boyce Thompson Institute for Plant Research
Tower Rd
Ithaca NY 14853
USA

(607) 254 3569
Sol Genomics Network
http://solgenomics.net/
[hidden email]



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: Unique constraint in natural diversity module

seth redmond
It's a hang-over from when the tables were supposed to be 'subclasses'  
of nd_experiment. I agree it makes more sense to have it removed now,  
it's been requested a number of times.

-s


On 22 Oct 2010, at 12:46, Naama Menda wrote:

> hi Bob,
> you could store the 2 measurements with 2 different experiment ids,  
> or use the same experiment for both.
> Someone at some point asked for the 1-1 constraint, and I can't  
> remember why.
> I think it's best to have users enforce this if needed on the  
> software level.
>
> Any other thoughts?
>
> -Naama
>
>
>
> On Fri, Oct 22, 2010 at 5:53 AM, Bob MacCallum <[hidden email]
> > wrote:
> Wasn't it just that if you are measuring two phenotypes, say leaf  
> size and fruit weight, then you'd use two nd_experiments (each  
> linked to the same stock) because you need two nd_protocols to  
> describe the two assays?
>
> We have no objections to relaxing the constraint though - I'm sure  
> there are situations where 1 to many is needed.
>
>
>
> On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]>  
> wrote:
> hi,
>
> does anyone know why there was a request to have the experiment_id  
> unique constraint on nd_experiment_phenotype ad genotype tables?
>
> There was a request recently to drop this 1-1 relationship, and I  
> can't figure out why it was requested in the first place .
>
> thanks!
> -Naama
>
>
> Naama Menda
> Boyce Thompson Institute for Plant Research
> Tower Rd
> Ithaca NY 14853
> USA
>
> (607) 254 3569
> Sol Genomics Network
> http://solgenomics.net/
> [hidden email]
>
>
> <ATT00003..txt><ATT00004..txt>


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: Unique constraint in natural diversity module

Naama Menda
ok, I'm going to update the SQL with the dropped 2 constraints.

-Naama


On Fri, Oct 22, 2010 at 8:23 AM, seth redmond <[hidden email]> wrote:
It's a hang-over from when the tables were supposed to be 'subclasses' of nd_experiment. I agree it makes more sense to have it removed now, it's been requested a number of times.

-s



On 22 Oct 2010, at 12:46, Naama Menda wrote:

hi Bob,
you could store the 2 measurements with 2 different experiment ids, or use the same experiment for both.
Someone at some point asked for the 1-1 constraint, and I can't remember why.
I think it's best to have users enforce this if needed on the software level.

Any other thoughts?

-Naama



On Fri, Oct 22, 2010 at 5:53 AM, Bob MacCallum <[hidden email]> wrote:
Wasn't it just that if you are measuring two phenotypes, say leaf size and fruit weight, then you'd use two nd_experiments (each linked to the same stock) because you need two nd_protocols to describe the two assays?

We have no objections to relaxing the constraint though - I'm sure there are situations where 1 to many is needed.



On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]> wrote:
hi,

does anyone know why there was a request to have the experiment_id unique constraint on nd_experiment_phenotype ad genotype tables?

There was a request recently to drop this 1-1 relationship, and I can't figure out why it was requested in the first place .

thanks!
-Naama


Naama Menda
Boyce Thompson Institute for Plant Research
Tower Rd
Ithaca NY 14853
USA

(607) 254 3569
Sol Genomics Network
http://solgenomics.net/
[hidden email]


<ATT00003..txt><ATT00004..txt>



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-help] Re: Unique constraint in natural diversity module

Hilmar Lapp-3
In reply to this post by Naama Menda
It looks to me that after relaxing this uniqueness constraint the table doesn't have a natural primary key anymore. Every table should have a natural primary key enforced by a UNIQUE constraint. Maybe the constraint should be on (nd_experiment_id,phenotype_id)?

-hilmar

On Oct 22, 2010, at 7:46 AM, Naama Menda wrote:

hi Bob,
you could store the 2 measurements with 2 different experiment ids, or use the same experiment for both.
Someone at some point asked for the 1-1 constraint, and I can't remember why.
I think it's best to have users enforce this if needed on the software level.

Any other thoughts?

-Naama



On Fri, Oct 22, 2010 at 5:53 AM, Bob MacCallum <[hidden email]> wrote:
Wasn't it just that if you are measuring two phenotypes, say leaf size and fruit weight, then you'd use two nd_experiments (each linked to the same stock) because you need two nd_protocols to describe the two assays?

We have no objections to relaxing the constraint though - I'm sure there are situations where 1 to many is needed.



On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]> wrote:
hi,

does anyone know why there was a request to have the experiment_id unique constraint on nd_experiment_phenotype ad genotype tables?

There was a request recently to drop this 1-1 relationship, and I can't figure out why it was requested in the first place .

thanks!
-Naama


Naama Menda
Boyce Thompson Institute for Plant Research
Tower Rd
Ithaca NY 14853
USA

(607) 254 3569
Sol Genomics Network
http://solgenomics.net/
[hidden email]



-- 
===========================================================
: Hilmar Lapp  -:- Durham, NC -:- informatics.nescent.org :
===========================================================





-- 
===========================================================
: Hilmar Lapp -:- Durham, NC -:- hlapp at drycafe dot net :
===========================================================





------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-help] Re: Unique constraint in natural diversity module

Naama Menda
In reply to this post by Naama Menda
Good point.
I dropped the 1-1 relationship and added a constraint on (nd_experiment_id, phenotype_id /genotype_id )

It's in svn, so update your schema if you're using it .

-Naama


Naama Menda
Boyce Thompson Institute for Plant Research
Tower Rd
Ithaca NY 14853
USA

(607) 254 3569
Sol Genomics Network
http://solgenomics.net/
[hidden email]


On Fri, Oct 22, 2010 at 9:27 AM, Hilmar Lapp <[hidden email]> wrote:
It looks to me that after relaxing this uniqueness constraint the table doesn't have a natural primary key anymore. Every table should have a natural primary key enforced by a UNIQUE constraint. Maybe the constraint should be on (nd_experiment_id,phenotype_id)?

-hilmar

On Oct 22, 2010, at 7:46 AM, Naama Menda wrote:

hi Bob,
you could store the 2 measurements with 2 different experiment ids, or use the same experiment for both.
Someone at some point asked for the 1-1 constraint, and I can't remember why.
I think it's best to have users enforce this if needed on the software level.

Any other thoughts?

-Naama



On Fri, Oct 22, 2010 at 5:53 AM, Bob MacCallum <[hidden email]> wrote:
Wasn't it just that if you are measuring two phenotypes, say leaf size and fruit weight, then you'd use two nd_experiments (each linked to the same stock) because you need two nd_protocols to describe the two assays?

We have no objections to relaxing the constraint though - I'm sure there are situations where 1 to many is needed.



On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]> wrote:
hi,

does anyone know why there was a request to have the experiment_id unique constraint on nd_experiment_phenotype ad genotype tables?

There was a request recently to drop this 1-1 relationship, and I can't figure out why it was requested in the first place .

thanks!
-Naama


Naama Menda
Boyce Thompson Institute for Plant Research
Tower Rd
Ithaca NY 14853
USA

(607) 254 3569
Sol Genomics Network
http://solgenomics.net/
[hidden email]



-- 
===========================================================
: Hilmar Lapp  -:- Durham, NC -:- informatics.nescent.org :
===========================================================





------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-help] Re: Unique constraint in natural diversity module

Sook Jung
Hi All,
I think I raised this issue many times but it somehow gets forgotten..
We decided long time ago that nd_experiment to phenotype was many to
one, not one to one, since many experiment can be linked to one
phenotype. For example, many experiments with different samples can
have sugar content of '3', so we didn't want to make multiple raws in
phenotype table for each experiment. So 1-1 constraint on
(nd_experiment_id, phenotype_id) would't work..

Then some other people suggested linking one experiment to many
phenotypes which is different isssue.

Thanks
Sook

On Fri, Oct 22, 2010 at 8:21 AM, Naama Menda <[hidden email]> wrote:

> Good point.
> I dropped the 1-1 relationship and added a constraint on (nd_experiment_id,
> phenotype_id /genotype_id )
>
> It's in svn, so update your schema if you're using it .
>
> -Naama
>
>
> Naama Menda
> Boyce Thompson Institute for Plant Research
> Tower Rd
> Ithaca NY 14853
> USA
>
> (607) 254 3569
> Sol Genomics Network
> http://solgenomics.net/
> [hidden email]
>
>
> On Fri, Oct 22, 2010 at 9:27 AM, Hilmar Lapp <[hidden email]> wrote:
>>
>> It looks to me that after relaxing this uniqueness constraint the table
>> doesn't have a natural primary key anymore. Every table should have a
>> natural primary key enforced by a UNIQUE constraint. Maybe the constraint
>> should be on (nd_experiment_id,phenotype_id)?
>> -hilmar
>> On Oct 22, 2010, at 7:46 AM, Naama Menda wrote:
>>
>> hi Bob,
>> you could store the 2 measurements with 2 different experiment ids, or use
>> the same experiment for both.
>> Someone at some point asked for the 1-1 constraint, and I can't remember
>> why.
>> I think it's best to have users enforce this if needed on the software
>> level.
>>
>> Any other thoughts?
>>
>> -Naama
>>
>>
>>
>> On Fri, Oct 22, 2010 at 5:53 AM, Bob MacCallum
>> <[hidden email]> wrote:
>>>
>>> Wasn't it just that if you are measuring two phenotypes, say leaf size
>>> and fruit weight, then you'd use two nd_experiments (each linked to the same
>>> stock) because you need two nd_protocols to describe the two assays?
>>>
>>> We have no objections to relaxing the constraint though - I'm sure there
>>> are situations where 1 to many is needed.
>>>
>>>
>>> On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]> wrote:
>>>>
>>>> hi,
>>>>
>>>> does anyone know why there was a request to have the experiment_id
>>>> unique constraint on nd_experiment_phenotype ad genotype tables?
>>>>
>>>> There was a request recently to drop this 1-1 relationship, and I can't
>>>> figure out why it was requested in the first place .
>>>>
>>>> thanks!
>>>> -Naama
>>>>
>>>>
>>>> Naama Menda
>>>> Boyce Thompson Institute for Plant Research
>>>> Tower Rd
>>>> Ithaca NY 14853
>>>> USA
>>>>
>>>> (607) 254 3569
>>>> Sol Genomics Network
>>>> http://solgenomics.net/
>>>> [hidden email]
>>>
>>
>>
>> --
>> ===========================================================
>> : Hilmar Lapp  -:- Durham, NC -:- informatics.nescent.org :
>> ===========================================================
>>
>>
>
>



--
Sook Jung, PhD
Assistant Research Professor of Bioinformatics
Dept of Horticulture and Landscape Architecture
Washington State University
45 Johnson Hall, Pullman, WA 99164-6414
Email:[hidden email]

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-help] Re: Unique constraint in natural diversity module

Naama Menda
I think it works both ways, as long as you don't store duplicate experiment-phenotype values .

I think an nd_experiment should be a phenotyping/genotyping event, with all measurements sharing the same properties (like date, location, person, etc.)

Of course if someone does not agree with this definition, there is no problem storing one experiment id for each single measurement. The 'experiment' notion in the natural div. module is just a way for linking stocks with phenotypes/genotypes, while allowing to re-use the same stock in multiple projects or field plots or whatever.

I guess the VectorBase people could chip in about making this work in the opposite direction ( an experiment yields new stocks)

-Naama


On Fri, Oct 22, 2010 at 11:58 AM, Sook Jung <[hidden email]> wrote:
Hi All,
I think I raised this issue many times but it somehow gets forgotten..
We decided long time ago that nd_experiment to phenotype was many to
one, not one to one, since many experiment can be linked to one
phenotype. For example, many experiments with different samples can
have sugar content of '3', so we didn't want to make multiple raws in
phenotype table for each experiment. So 1-1 constraint on
(nd_experiment_id, phenotype_id) would't work..

Then some other people suggested linking one experiment to many
phenotypes which is different isssue.

Thanks
Sook

On Fri, Oct 22, 2010 at 8:21 AM, Naama Menda <[hidden email]> wrote:
> Good point.
> I dropped the 1-1 relationship and added a constraint on (nd_experiment_id,
> phenotype_id /genotype_id )
>
> It's in svn, so update your schema if you're using it .
>
> -Naama
>
>
> Naama Menda
> Boyce Thompson Institute for Plant Research
> Tower Rd
> Ithaca NY 14853
> USA
>
> (607) 254 3569
> Sol Genomics Network
> http://solgenomics.net/
> [hidden email]
>
>
> On Fri, Oct 22, 2010 at 9:27 AM, Hilmar Lapp <[hidden email]> wrote:
>>
>> It looks to me that after relaxing this uniqueness constraint the table
>> doesn't have a natural primary key anymore. Every table should have a
>> natural primary key enforced by a UNIQUE constraint. Maybe the constraint
>> should be on (nd_experiment_id,phenotype_id)?
>> -hilmar
>> On Oct 22, 2010, at 7:46 AM, Naama Menda wrote:
>>
>> hi Bob,
>> you could store the 2 measurements with 2 different experiment ids, or use
>> the same experiment for both.
>> Someone at some point asked for the 1-1 constraint, and I can't remember
>> why.
>> I think it's best to have users enforce this if needed on the software
>> level.
>>
>> Any other thoughts?
>>
>> -Naama
>>
>>
>>
>> On Fri, Oct 22, 2010 at 5:53 AM, Bob MacCallum
>> <[hidden email]> wrote:
>>>
>>> Wasn't it just that if you are measuring two phenotypes, say leaf size
>>> and fruit weight, then you'd use two nd_experiments (each linked to the same
>>> stock) because you need two nd_protocols to describe the two assays?
>>>
>>> We have no objections to relaxing the constraint though - I'm sure there
>>> are situations where 1 to many is needed.
>>>
>>>
>>> On Thu, Oct 21, 2010 at 9:00 PM, Naama Menda <[hidden email]> wrote:
>>>>
>>>> hi,
>>>>
>>>> does anyone know why there was a request to have the experiment_id
>>>> unique constraint on nd_experiment_phenotype ad genotype tables?
>>>>
>>>> There was a request recently to drop this 1-1 relationship, and I can't
>>>> figure out why it was requested in the first place .
>>>>
>>>> thanks!
>>>> -Naama
>>>>
>>>>
>>>> Naama Menda
>>>> Boyce Thompson Institute for Plant Research
>>>> Tower Rd
>>>> Ithaca NY 14853
>>>> USA
>>>>
>>>> (607) 254 3569
>>>> Sol Genomics Network
>>>> http://solgenomics.net/
>>>> [hidden email]
>>>
>>
>>
>> --
>> ===========================================================
>> : Hilmar Lapp  -:- Durham, NC -:- informatics.nescent.org :
>> ===========================================================
>>
>>
>
>



--
Sook Jung, PhD
Assistant Research Professor of Bioinformatics
Dept of Horticulture and Landscape Architecture
Washington State University
45 Johnson Hall, Pullman, WA 99164-6414
[hidden email]


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-help] Re: Unique constraint in natural diversity module

Hilmar Lapp-3
In reply to this post by Sook Jung

On Oct 22, 2010, at 11:58 AM, Sook Jung wrote:

> We decided long time ago that nd_experiment to phenotype was many to
> one, not one to one, since many experiment can be linked to one
> phenotype. For example, many experiments with different samples can
> have sugar content of '3', so we didn't want to make multiple raws in
> phenotype table for each experiment. So 1-1 constraint on
> (nd_experiment_id, phenotype_id) would't work..


I don't know what you mean here - this is a compound key, not a one-to-
one constraint, and effectively resembles a n-n (or many-to-many)  
relationship.

Are you saying that multiple rows with identical values for  
nd_experiment_id and phenotype_id should be allowed? If so, how would  
you distinguish these rows from one another? In other words, if you  
think that (nd_experiment_id, phenotype_id) is not the natural primary  
key, what is it then?

        -hilmar
--
===========================================================
: Hilmar Lapp -:- Durham, NC -:- hlapp at drycafe dot net :
===========================================================





------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-help] Re: Unique constraint in natural diversity module

Sook Jung
Oh I wasn't thinking straight this morning. Forget about what I said :(
Sook

On Fri, Oct 22, 2010 at 9:09 AM, Hilmar Lapp <[hidden email]> wrote:

>
> On Oct 22, 2010, at 11:58 AM, Sook Jung wrote:
>
>> We decided long time ago that nd_experiment to phenotype was many to
>> one, not one to one, since many experiment can be linked to one
>> phenotype. For example, many experiments with different samples can
>> have sugar content of '3', so we didn't want to make multiple raws in
>> phenotype table for each experiment. So 1-1 constraint on
>> (nd_experiment_id, phenotype_id) would't work..
>
>
> I don't know what you mean here - this is a compound key, not a one-to-one
> constraint, and effectively resembles a n-n (or many-to-many) relationship.
>
> Are you saying that multiple rows with identical values for nd_experiment_id
> and phenotype_id should be allowed? If so, how would you distinguish these
> rows from one another? In other words, if you think that (nd_experiment_id,
> phenotype_id) is not the natural primary key, what is it then?
>
>        -hilmar
> --
> ===========================================================
> : Hilmar Lapp -:- Durham, NC -:- hlapp at drycafe dot net :
> ===========================================================
>
>
>
>
>



--
Sook Jung, PhD
Assistant Research Professor of Bioinformatics
Dept of Horticulture and Landscape Architecture
Washington State University
45 Johnson Hall, Pullman, WA 99164-6414
Email:[hidden email]

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: [Gmod-help] Re: Unique constraint in natural diversity module

Naama Menda
Sook,
if you were thinking about re-using the phenotype ids, I think that's ok too, as long as you link it with a different experiment.

-Naama



On Fri, Oct 22, 2010 at 12:19 PM, Sook Jung <[hidden email]> wrote:
Oh I wasn't thinking straight this morning. Forget about what I said :(
Sook

On Fri, Oct 22, 2010 at 9:09 AM, Hilmar Lapp <[hidden email]> wrote:
>
> On Oct 22, 2010, at 11:58 AM, Sook Jung wrote:
>
>> We decided long time ago that nd_experiment to phenotype was many to
>> one, not one to one, since many experiment can be linked to one
>> phenotype. For example, many experiments with different samples can
>> have sugar content of '3', so we didn't want to make multiple raws in
>> phenotype table for each experiment. So 1-1 constraint on
>> (nd_experiment_id, phenotype_id) would't work..
>
>
> I don't know what you mean here - this is a compound key, not a one-to-one
> constraint, and effectively resembles a n-n (or many-to-many) relationship.
>
> Are you saying that multiple rows with identical values for nd_experiment_id
> and phenotype_id should be allowed? If so, how would you distinguish these
> rows from one another? In other words, if you think that (nd_experiment_id,
> phenotype_id) is not the natural primary key, what is it then?
>
>        -hilmar
> --
> ===========================================================
> : Hilmar Lapp -:- Durham, NC -:- hlapp at drycafe dot net :
> ===========================================================
>
>
>
>
>



--
Sook Jung, PhD
Assistant Research Professor of Bioinformatics
Dept of Horticulture and Landscape Architecture
Washington State University
45 Johnson Hall, Pullman, WA 99164-6414
[hidden email]


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema