[Bio] / CatalogServices / Catalog.sql Repository:
ViewVC logotype

View of /CatalogServices/Catalog.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Fri Jan 7 14:40:32 2005 UTC (15 years, 4 months ago) by efrank
Branch: MAIN
CVS Tags: post-st-migration2, post-st-migration, before-dynamics-persistence, lwc, treatman-lastDay-0, preTreatmanDyn, HEAD
migration to new schematools generated classes.
new chemdb.
factor chem out of seed data factory
imporved configuration of modeleditor

-- ---------------------------------------------------------------
create table KahCatDirEntry (
--
-- Lists all KahCatDirEntry 
-- ---------------------------------------------------------------
--
	CatName   	VARCHAR(128)	NOT NULL,
	/* A short name for the metabolite */
--
	CatDirEntId	Numeric(15)	NOT NULL,
        isTerminal      Numeric(1)       DEFAULT 0  NOT NULL,
        NextVer         Numeric(5)       DEFAULT 0  NOT NULL,
        FullPathName    VARCHAR(1024)  NOT NULL,
	/* The full name (in someones universe) */
--
	CONSTRAINT KahCatDirEntry_PK PRIMARY KEY (CatDirEntID)
);
INSERT into KahTableList VALUES( 'KahCatDirEntry', 'Catalog' );

create sequence KahCatDirEntIdSequence  increment by 1 start with 50000;
INSERT into KahSequenceList VALUES( 'KahCatDirEntIdSequence', 'Catalog' );




create table KahCatSubDir(
--
-- Defines the CatEntry with CatEntryID and name
--
-- ----------------------------------------------------------------------
--
	ParentCatDirEntId	Numeric(15)	NOT NULL,
--
	ChildCatDirEntId	Numeric(15)	NOT NULL,
--
        CONSTRAINT KahCatSubDir_Uniq  UNIQUE (ParentCatDirEntId, ChildCatDirEntId)
--
);
INSERT into KahTableList VALUES( 'KahCatSubDir', 'Catalog' );


create table KahCatDirEntVersions  (
-- ---------------------------------------------------------------
--
-- Lists all versions associated with a catalog entry
--
	CatDirEntId     	Numeric(15)  NOT NULL,
	VerNo 	  		Numeric(7)   	NOT NULL,
        DefaultVer      	Numeric(1)  DEFAULT 0,
	CONSTRAINT KahCatDirEntVersions_PK PRIMARY KEY (CatDirEntId,VerNo )
);

INSERT into KahTableList VALUES( 'KahCatDirEntVersions', 'Catalog' );

-- ----------------------------------------------------------------------
create table KahNavCat2ObjMod (
--
-- A relation that navigates from the Catalog Entry to the Object 
-- Model.
-- ----------------------------------------------------------------------
--
	CatDirEntId                Numeric(15)     NOT NULL,
        VerNo                      Numeric(7)      NOT NULL,
--
        FoundryId                 VARCHAR(128)	  NOT NULL,
        KeyIntVal                 Numeric(15)      NOT NULL,
        KeyStrVal                 VARCHAR(128),
        CONSTRAINT KahNavCat2ObjMod_PK PRIMARY KEY (CatDirEntId, VerNo),
        CONSTRAINT KahNavCat2FoundryItem_Uniq  UNIQUE(  FoundryId,KeyIntVal, KeyStrVal) 
);
INSERT into KahTableList VALUES( 'KahNavCat2ObjMod', 'Catalog' );


create table KahNavCat2Prov (
--
-- A relation that navigates from the Catalog Entry to the Provenance 
-- Model.
-- ----------------------------------------------------------------------
--
	CatDirEntId                  Numeric(15)     NOT NULL,
        VerNo                     Numeric(7)     NOT NULL,
--
        ProvInfoId                  Numeric(15)	NOT NULL,
        CONSTRAINT KahNavCat2Prov_PK PRIMARY KEY (CatDirEntId, VerNo)     
);
INSERT into KahTableList VALUES( 'KahNavCat2Prov', 'Catalog' );



create table KahFoundryRegistry (
--
-- IGNORE THIS ONE.  ITS BEEN ABANDONED FOR NOW
--
-- A relation that contains information about the FoundryId and Name. 
-- ----------------------------------------------------------------------
--
	FoundryId                    Numeric(15)        NOT NULL,
	FoundryName                  VARCHAR(128)     NOT NULL,            
        CONSTRAINT KahFoundryRegistry_PK PRIMARY KEY (FoundryId),
        CONSTRAINT KahFoundryName_Uniq  UNIQUE (FoundryName )     
);

INSERT into KahTableList VALUES( 'KahFoundryRegistry', 'Catalog' );

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3