[Bio] / BioSimScratch / ExcelBasedECTables.sql Repository:
ViewVC logotype

View of /BioSimScratch/ExcelBasedECTables.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (download) (annotate)
Thu Nov 4 02:19:58 2004 UTC (15 years ago) by efrank
Branch: MAIN
CVS Tags: post-st-migration2, sc2004-3, post-st-migration, sc2004-4, sc04-finalDay, HEAD
Changes since 1.7: +6 -6 lines
cleanAGEntry:		removes stale state from sharedApp

DDL related: 		increased size of varchars for names of chemistry stuff
			to handle big fat seed stuff

SeedDataFactory		turn off mapping of assignments to chemistry.

KahCatAGCfgMgr		remmoveKey() to support cleanAGEntry

StringReaction:		allow multiple : in strings being parsed to handle
			junk from seed with lots of colons.  ONly the final
			is treated as deliminting the end of the enzyme name

ModelEditor		signal handling, but commentd back out.

RXpanel			duh

-- ----------------------------------------------------------------------
drop   table ECMetabolite;
create table ECMetabolite (
--
-- Lists all metabolites in the excel spreadsheet based E. coli
-- reconstruction giving both short names and long names.  The
-- short name is a key
-- ----------------------------------------------------------------------
--
	ShortName	varchar2(512)	NOT NULL,
	/* A short name for the metabolite */
--
	LongName	varchar(512)	NOT NULL,
	/* The full name (in someones universe) */
--
	CONSTRAINT ECMetabolite_PK PRIMARY KEY (ShortName, LongName)
);

-- ----------------------------------------------------------------------
drop   table ECReactions;
create table ECReactions (
--
-- Defines the reaction numbers (just integers that serve as ids)
-- and gives the direction of the reaction (forward, backward, both).
-- Relations will be used to construct the reactions.
-- ----------------------------------------------------------------------
--
	RxId		Number(6)	NOT NULL,
	/* Reaction Id */
--
	Direction	varchar2(8)	NOT NULL,
	/* need constraint of 'forward' 'backward' 'both'  */
--
	CONSTRAINT ECReactions_PK PRIMARY KEY ( RxId )
);

-- ----------------------------------------------------------------------
drop   table ECEnzymeRole;
create table ECEnzymeRole (
--
-- Gives the name of a catalyst (required), a corresponding
-- function (EC number), if available, and an EnzymeRoleId.
-- The latter is just an integer id used to build our relations.
-- The notion in this table is a catalyst/enzyme in a specific
-- role. So, if an enzyme servers multiple purposes in a
-- reconstruction, there will be multiple entries in this table.
-- ----------------------------------------------------------------------
--
        EnzymeRoleId          number(6)	NOT NULL,
        /* a simple integer to serve as key */
--
	Function		varchar(512),
	/* EC number in format nn.nn.nn.nn .  All 4 must */
        /* be present.  Use the literal '--' for missing parts */
        /* The whole Function entry _may_ be null. */
--
	EnzymeName		varchar(512)	NOT NULL,
	/* Enzyme  name */
--
	CONSTRAINT ECEnzymeRole_PK PRIMARY KEY ( EnzymeRoleId )
);

-- ----------------------------------------------------------------------
drop   table ECRxInput;
create table ECRxInput (
--
-- A relation that ties reactions to metabolites that are inputs
-- to the reaction.  The constraint does not work because of
-- Seed/KEGG
-- ----------------------------------------------------------------------
--
	RxId		Number(6)	NOT NULL,
	/* Reaction ID that we are binding metabolite to */
--
        Stoich          float(32)	NOT NULL,
        /* number of molecules of this kind in reaction */
--
	ShortName	varchar2(512)	NOT NULL
--
--	CONSTRAINT ECRxInput_PK PRIMARY KEY (RxId, ShortName)
);

-- ----------------------------------------------------------------------
drop   table ECRxOutput;
create table ECRxOutput (
--
-- A relation that ties reactions to metabolites that are outputs
-- to the reaction.  The constraint does not work because of
-- Seed/KEGG
-- ----------------------------------------------------------------------
--
	RxId		Number(6)	NOT NULL,
	/* Reaction ID that we are binding metabolite to */
--
        Stoich          float(32)	NOT NULL,
        /* number of molecules of this kind in reaction */
--
	ShortName	varchar2(512)	NOT NULL
--
--	CONSTRAINT ECRxOutput_PK PRIMARY KEY (RxId, ShortName)
);

-- ----------------------------------------------------------------------
drop   table ECCatalyst;
create table ECCatalyst (
--
-- A relation that binds catalysts/enzymes to a specific reaction.
-- ----------------------------------------------------------------------
--
	RxId		Number(6)	NOT NULL,
	/* Reaction ID that we are binding enzyme to */
--
        EnzymeRoleId          number(6)	NOT NULL
	/* enzyme to associate */
);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3