Revision 203
Added by Matt Jones almost 24 years ago
xmltables.sql | ||
---|---|---|
19 | 19 |
set echo off |
20 | 20 |
|
21 | 21 |
DROP SEQUENCE xml_nodes_id_seq; |
22 |
DROP SEQUENCE xml_revisions_id_seq; |
|
22 | 23 |
DROP SEQUENCE xml_catalog_id_seq; |
23 | 24 |
|
25 |
DROP TRIGGER xml_revisions_before_insert; |
|
24 | 26 |
DROP TRIGGER xml_catalog_before_insert; |
25 | 27 |
|
26 | 28 |
DROP TABLE xml_index; |
27 | 29 |
DROP TABLE xml_catalog; |
28 | 30 |
DROP TABLE xml_documents; |
31 |
DROP TABLE xml_revisions; |
|
29 | 32 |
DROP TABLE xml_nodes; |
30 | 33 |
DROP TABLE xml_acc_numbers; |
31 | 34 |
|
... | ... | |
71 | 74 |
); |
72 | 75 |
|
73 | 76 |
/* |
77 |
* Revised Documents -- table to store XML documents saved after an UPDATE |
|
78 |
* or DELETE |
|
79 |
*/ |
|
80 |
CREATE TABLE xml_revisions ( |
|
81 |
revisionid NUMBER(20), -- the revision number we are saving |
|
82 |
docid VARCHAR2(250), -- the document id # |
|
83 |
rootnodeid NUMBER(20), -- reference to root node of the DOM |
|
84 |
docname VARCHAR2(100), -- usually the root element name |
|
85 |
doctype VARCHAR2(100), -- public id indicating document type |
|
86 |
doctitle VARCHAR2(1000), -- title of document if exists |
|
87 |
date_created DATE, |
|
88 |
date_updated DATE, |
|
89 |
CONSTRAINT xml_revisions_pk PRIMARY KEY (revisionid), |
|
90 |
CONSTRAINT xml_revisions_root_fk |
|
91 |
FOREIGN KEY (rootnodeid) REFERENCES xml_nodes |
|
92 |
); |
|
93 |
|
|
94 |
CREATE SEQUENCE xml_revisions_id_seq; |
|
95 |
|
|
96 |
CREATE TRIGGER xml_revisions_before_insert |
|
97 |
BEFORE INSERT ON xml_revisions FOR EACH ROW |
|
98 |
BEGIN |
|
99 |
SELECT xml_revisions_id_seq.nextval |
|
100 |
INTO :new.revisionid |
|
101 |
FROM dual; |
|
102 |
END; |
|
103 |
/ |
|
104 |
|
|
105 |
/* |
|
74 | 106 |
* XML Catalog -- table to store all external sources for XML documents |
75 | 107 |
*/ |
76 | 108 |
CREATE TABLE xml_catalog ( |
Also available in: Unified diff
Merged in substantial changes to DBWriter and associated classes and to
the MetaCatServlet in order to accomodate the new UPDATE and DELETE
functions. The command line tools and the parameters for the
servlet have changed substantially.