[Bio] / BioSimScratch / FnlChartTab-pg.sql Repository:
ViewVC logotype

View of /BioSimScratch/FnlChartTab-pg.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Tue Oct 19 19:33:32 2004 UTC (14 years, 11 months ago) by efrank
Branch: MAIN
CVS Tags: post-st-migration2, sc2004-3, post-st-migration, sc2004-4, sc04-finalDay, sc2004-2, sc2004-1, sc2004-0, HEAD
make work for pg too

     
-- ----------------------------------------------------------------------
drop   table ProcList;
create table ProcList (
--
-- Lists all the processes and assigns a unique ID.  A process
-- is something that happens, e.g., a reaction, set of reactions,
-- set of rules, etc.
-- ----------------------------------------------------------------------
--
	ProcName	varchar(128)	NOT NULL,
--	/* Process name    */
--
	ProcId		integer 	NOT NULL,
--	/* A unique number */
--
	Model		text,
--	Model		BFILE,
--	/* A file describing the process */
--
        CONSTRAINT ProcList_PK PRIMARY KEY ( ProcId )
);

-- ----------------------------------------------------------------------
drop   table ProcStruct;
create table ProcStruct (
--
-- Lists the immediate descendents of each Process.  Thus,
-- for any process name (Parent), list its parts (ChildProc)
-- ----------------------------------------------------------------------
--
	ParentProc	varchar(128)	NOT NULL,
--	/* Name of proc */
--
	ParentProcId	integer 	NOT NULL,
--
	ChildProc	varchar(128) 	NOT NULL,
--
	ChildProcID	integer 	NOT NULL

);

-- ----------------------------------------------------------------------
drop   table RecoCatalogEntry;
create table RecoCatalogEntry (
--
-- Catalog of reconstructions.  Another table holds a relation
-- tying processes to reconstructions.
-- ----------------------------------------------------------------------
--
	RecoName	varchar(128)	NOT NULL UNIQUE,
--
	Curator		varchar(128),
--
	RecoId		integer         NOT NULL,
--
	CONSTRAINT RecoCatalogEntry_PK PRIMARY KEY ( RecoId )
);

-- ----------------------------------------------------------------------
drop   table ProcessInReco;
create table ProcessInReco (
--
-- Lists the processes that are in a reconstruction.  I'm not sure
-- yet if this should mean that you list some nodes and we infer
-- that there descendents are in the reco transitively, or if we
-- list the transitive closure in this table and ask the ProcStruct
-- structural questions.  For the moment, we take the policy that
-- this table just locates the list of top nodes in the reconstruction
-- and we then chase those through the ProcStruct table.--
-- ----------------------------------------------------------------------
--
	RecoId		integer         NOT NULL,
--
	ProcessId	integer         NOT NULL
);

-- ----------------------------------------------------------------------
drop   table ReactionsInProcess;
create table ReactionsInProcess (
--
-- Lists the reactions associated with a process in a reconstruction.
-- This is a weak relation between reaction, recoCatalogEntry,
-- and Process
-- ----------------------------------------------------------------------
--
	RxId		integer	        NOT NULL,
--
	ProcessId	integer         NOT NULL,
--
	RecoId		integer 	NOT NULL
);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3