Revision 414
Added by bojilova about 24 years ago
src/xmltables.sql | ||
---|---|---|
27 | 27 |
|
28 | 28 |
DROP TABLE xml_index; |
29 | 29 |
DROP TABLE xml_catalog; |
30 |
DROP TABLE xml_access; |
|
31 |
DROP TABLE xml_revisions; |
|
30 | 32 |
DROP TABLE xml_documents; |
31 |
DROP TABLE xml_revisions; |
|
32 | 33 |
DROP TABLE xml_nodes; |
33 | 34 |
DROP TABLE xml_acc_numbers; |
34 | 35 |
|
... | ... | |
66 | 67 |
docname VARCHAR2(100), -- usually the root element name |
67 | 68 |
doctype VARCHAR2(100), -- public id indicating document type |
68 | 69 |
doctitle VARCHAR2(1000), -- title of document if exists |
70 |
user_owner VARCHAR2(100), -- the user owned the document |
|
71 |
user_updated VARCHAR2(100), -- the user updated the document |
|
69 | 72 |
date_created DATE, |
70 | 73 |
date_updated DATE, |
74 |
public_access NUMBER(1), -- flag for public access |
|
71 | 75 |
CONSTRAINT xml_documents_pk PRIMARY KEY (docid), |
72 | 76 |
CONSTRAINT xml_documents_root_fk |
73 | 77 |
FOREIGN KEY (rootnodeid) REFERENCES xml_nodes |
74 | 78 |
); |
75 | 79 |
|
76 | 80 |
/* |
81 |
* ACL -- table to store ACL for XML documents by principals |
|
82 |
*/ |
|
83 |
CREATE TABLE xml_access ( |
|
84 |
docid VARCHAR2(250), -- the document id # |
|
85 |
principal_name VARCHAR2(100), -- name of user, user group, etc. |
|
86 |
principal_type VARCHAR2(20), -- like "user", "group", etc. |
|
87 |
access_type NUMBER(1), -- "read", "write", "all" |
|
88 |
begin_time DATE, -- the time that access permission begins |
|
89 |
end_time DATE, -- the time that access permission ends |
|
90 |
CONSTRAINT xml_access_pk UNIQUE (docid, principal_name, principal_type, access_type, begin_time), |
|
91 |
CONSTRAINT xml_access_docid_fk |
|
92 |
FOREIGN KEY (docid) REFERENCES xml_documents, |
|
93 |
CONSTRAINT xml_access_ck CHECK (begin_time < end_time) |
|
94 |
); |
|
95 |
|
|
96 |
/* |
|
77 | 97 |
* Revised Documents -- table to store XML documents saved after an UPDATE |
78 | 98 |
* or DELETE |
79 | 99 |
*/ |
... | ... | |
84 | 104 |
docname VARCHAR2(100), -- usually the root element name |
85 | 105 |
doctype VARCHAR2(100), -- public id indicating document type |
86 | 106 |
doctitle VARCHAR2(1000), -- title of document if exists |
107 |
user_owner VARCHAR2(100), |
|
108 |
user_updated VARCHAR2(100), |
|
87 | 109 |
date_created DATE, |
88 | 110 |
date_updated DATE, |
89 | 111 |
CONSTRAINT xml_revisions_pk PRIMARY KEY (revisionid), |
Also available in: Unified diff
new table xml_access and new attrs to xml_documents for ACL