Project

General

Profile

« Previous | Next » 

Revision 517

Added by berkley about 24 years ago

updated xml_relation table

View differences:

src/xmltables.sql
22 22
DROP SEQUENCE xml_revisions_id_seq;
23 23
DROP SEQUENCE xml_catalog_id_seq;
24 24
DROP SEQUENCE xml_relation_id_seq;
25
DROP SEQUENCE xml_replication_id_seq;
25 26

  
26 27
DROP TRIGGER xml_revisions_before_insert;
27 28
DROP TRIGGER xml_catalog_before_insert;
28 29
DROP TRIGGER xml_relation_before_insert;
30
DROP TRIGGER xml_replication_before_insert;
29 31

  
30 32
DROP INDEX xml_relation_index;
31 33

  
......
37 39
DROP TABLE xml_nodes;
38 40
DROP TABLE xml_acc_numbers;
39 41
DROP TABLE xml_relation;
42
DROP TABLE xml_replication;
40 43

  
44
/*
45
 *Replication -- table to store servers that metacat is replicated to
46
 */
47
CREATE TABLE xml_replication (
48
  server    VARCHAR2(512),
49
  last_checked  DATE);  
50

  
41 51
/* 
42 52
 * Nodes -- table to store XML Nodes (both elements and attributes)
43 53
 */
......
196 206

  
197 207
CREATE TABLE xml_relation (
198 208
  relationid    NUMBER(20) PRIMARY KEY,  -- unique id
199
  subject       VARCHAR2(1024) NOT NULL, -- the subject of the relation
200
  subdoctype    VARCHAR2(256),           -- the doctype of the subject
201
  relationship  VARCHAR2(512)  NOT NULL, -- the relationship type
202
  object        VARCHAR2(1024) NOT NULL, -- the object of the relation
203
  objdoctype    VARCHAR2(256)            -- the doctype of the object
209
  subject       VARCHAR2(512) NOT NULL, -- the subject of the relation
210
  subdoctype    VARCHAR2(128),           -- the doctype of the subject
211
  relationship  VARCHAR2(128)  NOT NULL, -- the relationship type
212
  object        VARCHAR2(512) NOT NULL, -- the object of the relation
213
  objdoctype    VARCHAR2(128),            -- the doctype of the object
214
  CONSTRAINT xml_relation_unk UNIQUE (subject, relationship, object)
204 215
  );
205
CREATE UNIQUE INDEX xml_relation_index
206
       ON xml_relation(relationid, subject, relationship, object);
207 216

  
208 217
CREATE SEQUENCE xml_relation_id_seq;
209 218
  

Also available in: Unified diff