[Gmod-help] Re: [Gmod-schema] Unique constraint in natural diversity module
Naama Menda
nm249 at cornell.edu
Fri Oct 22 12:07:36 EDT 2010
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 <sookjc at gmail.com> 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 <nm249 at cornell.edu> 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/
> > nm249 at cornell.edu
> >
> >
> > On Fri, Oct 22, 2010 at 9:27 AM, Hilmar Lapp <hlapp at nescent.org> 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
> >> <r.maccallum at imperial.ac.uk> 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 <nm249 at cornell.edu>
> 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/
> >>>> nm249 at cornell.edu
> >>>
> >>
> >>
> >> --
> >> ===========================================================
> >> : 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:sook at bioinfo.wsu.edu <Email%3Asook at bioinfo.wsu.edu>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://brie4.cshl.edu/pipermail/gmod-help/attachments/20101022/2b42583e/attachment.html>
More information about the Gmod-help
mailing list