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

View of /BioSimScratch/CreateCatalog.sql

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (download) (annotate)
Mon Jul 12 20:38:19 2004 UTC (15 years, 4 months ago) by efrank
Branch: MAIN
CVS Tags: post-st-migration2, mass-spec-01, sc2004-3, mass-spec-02, post-st-migration, forRick-14Jul04-1, forRick-14Jul04-0, sc2004-4, sc04-finalDay, sc2004-2, sc2004-1, sc2004-0, HEAD
Changes since 1.12: +2 -1 lines
KahOM/KahDataMgr:
	first pass at top level data manager to be returned from catalogentry read

Schema:
	added KahDatabaseInfo to put fid into database.
	create- changed so that no long initialize name of top catalogEntry (see below)
	destroyBss- changed !#/usr/bin/py to env py

FaST:
	txMgr - fixed close()...added self
	BssFactory - now gets fid via kahDatabaseInfo in database

PyGUI
	change so that something or another

-- ---------------------------------------------------------------
drop   table KahCatDirEntry;
create table KahCatDirEntry (
--
-- Lists all KahCatDirEntry 
-- ---------------------------------------------------------------
--
	CatName   	varchar2(128)	NOT NULL,
	/* A short name for the metabolite */
--
	CatDirEntId	Number(15)	NOT NULL,
        isTerminal      Number(1)       DEFAULT 0  NOT NULL,
        NextVer         Number(5)       DEFAULT 0  NOT NULL,
        FullPathName    varchar2(1024)  NOT NULL,
	/* The full name (in someones universe) */
--
	CONSTRAINT KahCatDirEntry_PK PRIMARY KEY (CatDirEntID)
);

drop   sequence KahCatDirEntIdSequence;
create sequence KahCatDirEntIdSequence  increment by 1 start with 50000;


drop   table KahCatSubDir;
create table KahCatSubDir(
--
-- Defines the CatEntry with CatEntryID and name
--
-- ----------------------------------------------------------------------
--
	ParentCatDirEntId	Number(15)	NOT NULL,
--
	ChildCatDirEntId	Number(15)	NOT NULL,
--
        CONSTRAINT KahCatSubDir_Uniq  UNIQUE (ParentCatDirEntId, ChildCatDirEntId)
--
);


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

-- ----------------------------------------------------------------------
drop   table KahNavCat2ObjMod;
create table KahNavCat2ObjMod (
--
-- A relation that navigates from the Catalog Entry to the Object 
-- Model.
-- ----------------------------------------------------------------------
--
	CatDirEntId                Number(15)     NOT NULL,
        VerNo                      Number(7)      NOT NULL,
--
        FoundryId                 varchar2(128)	  NOT NULL,
        KeyIntVal                 Number(15)      NOT NULL,
        KeyStrVal                 varchar2(128),
        CONSTRAINT KahNavCat2ObjMod_PK PRIMARY KEY (CatDirEntId, VerNo),
        CONSTRAINT KahNavCat2FoundryItem_Uniq  UNIQUE(  FoundryId,KeyIntVal, KeyStrVal) 
);


drop   table KahNavCat2Prov;
create table KahNavCat2Prov (
--
-- A relation that navigates from the Catalog Entry to the Provenance 
-- Model.
-- ----------------------------------------------------------------------
--
	CatDirEntId                  Number(15)     NOT NULL,
        VerNo                     Number(7)     NOT NULL,
--
        ProvInfoId                  Number(15)	NOT NULL,
        CONSTRAINT KahNavCat2Prov_PK PRIMARY KEY (CatDirEntId, VerNo)     
);



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




-- We no longer do this here.  Run InitializeDb.py

-- INSERT INTO KahCatDirEntry values ('Bss', 0, 0, 0, '/Bss');

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3