Talk:GeneDatabaseLayout

From PathVisio Wiki

Jump to: navigation, search

This is similar to an idea we talked about a while ago.

You can implement an object-oriented scheme using tables like this:

Gene

column type key description
id varchar(50) PRI datanode identifier
code varchar(50) PRI identifier database code
bpText varchar backpage text (html formatted)

GeneWithDescription

column type key description
id varchar(50) PRI datanode identifier
code varchar(50) PRI identifier database code
description varchar description


GeneWithChromosomeLocation

column type key description
id varchar(50) PRI datanode identifier
code varchar(50) PRI identifier database code
chromosome varchar(5) Chromosome number (roman)
location number Position on reference sequence


But then, your idea may be much simpler.


Alex 20:35, 25 July 2007 (CEST)

I don't think the WHERE - IN clause will work here. As far as I understand it is for 1-to-many matches, i.e., WHERE one IN (many). I would use the following instead:

SELECT * FROM Gene LEFT JOIN Attributes USING (id, code) WHERE attName = 'symbol' AND attValueE = 'TNF1'

As long as id and code exist in both tables this works and there is no need for a unique key.


Personal tools