|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/biostruc/PubStruct.scr |
source navigation diff markup identifier search freetext search file search |
1 /* 2 * $Id: PubStruct.scr,v 6.2 1998/06/05 17:59:55 kimelman Exp $ 3 * =========================================================================== 4 * 5 * PUBLIC DOMAIN NOTICE 6 * National Center for Biotechnology Information (NCBI) 7 * 8 * This software/database is a "United States Government Work" under the 9 * terms of the United States Copyright Act. It was written as part of 10 * the author's official duties as a United States Government employee and 11 * thus cannot be copyrighted. This software/database is freely available 12 * to the public for use. The National Library of Medicine and the U.S. 13 * Government do not place any restriction on its use or reproduction. 14 * We would, however, appreciate having the NCBI and the author cited in 15 * any work or product based on this material 16 * 17 * Although all reasonable efforts have been taken to ensure the accuracy 18 * and reliability of the software and data, the NLM and the U.S. 19 * Government do not and cannot warrant the performance or results that 20 * may be obtained by using this software or data. The NLM and the U.S. 21 * Government disclaim all warranties, express or implied, including 22 * warranties of performance, merchantability or fitness for any particular 23 * purpose. 24 * 25 * =========================================================================== 26 * 27 * Author: Michael Kimelman 28 * 29 * PubStruct schema definition 30 * 31 * Modifications: 32 * 33 * $Log: PubStruct.scr,v $ 34 * Revision 6.2 1998/06/05 17:59:55 kimelman 35 * help tags changed 36 * 37 * 38 */ 39 40 use PubStruct 41 go 42 43 PRINT "create acc" 44 go 45 /* 46 * TABLE acc : ticketing 47 */ 48 49 create table acc ( 50 kind tinyint primary key, 51 ticket int NOT NULL 52 ) 53 go 54 55 insert into acc values(1,1) 56 go 57 58 /* 59 * TABLE Struct : main PubStruct storage 60 */ 61 62 PRINT "create Struct" 63 go 64 65 create table Struct ( 66 acc int NOT NULL primary key, /* technical accession number */ 67 mmdb_id int NOT NULL, 68 state int NOT NULL, /* important thing */ 69 /* value -- legend 70 0 alive and ready for public retrieval 71 >0 intermediate states on "assembling line". 72 if we update some structure(BLOB) we suppress previous version 73 instead of removing it. 74 */ 75 date datetime NOT NULL, /* date of arriving in this state */ 76 suppressed tinyint NOT NULL, /* >0 - if suppressed by newly arrived data */ 77 confidential tinyint NOT NULL, 78 blob image NULL 79 ) 80 go 81 82 CREATE INDEX mmdb_PubStruct ON Struct(mmdb_id,state) 83 go 84 85 grant select on Struct to public 86 go 87 88 grant update(blob) on Struct to public 89 go 90 91 /* 92 * TABLE pdb : pdb to mmdb translation. 93 */ 94 95 PRINT "create pdb" 96 go 97 98 create table pdb ( 99 mmdb_id int NOT NULL PRIMARY KEY, 100 pdb_id char(4) NOT NULL, 101 ) 102 go 103 104 CREATE INDEX pdb_PubStruct ON pdb(pdb_id) 105 go 106 107 grant select on pdb to public 108 go
|
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |