CREATE TABLE xml_access ( docid VARCHAR2, -- the document id # principal_name VARCHAR2, -- name of user, group, etc. permission NUMBER, -- "read", "write", "all" perm_type VARCHAR2, -- "allowed" or "denied" perm_order VARCHAR2 -- "allow first" or "deny first" begin_time DATE, -- the time that permission begins end_time DATE, -- the time that permission ends ticket_count NUMBER, -- ticket counter for that permission CONSTRAINT xml_access_pk UNIQUE (docid, principal_name, permission, perm_type), CONSTRAINT xml_access_ck CHECK (begin_time < end_time));
CREATE TABLE xml_access (
docid VARCHAR2, -- the document id #
principal_name VARCHAR2, -- name of user, group, etc.
permission NUMBER, -- "read", "write", "all"
perm_type VARCHAR2, -- "allowed" or "denied"
perm_order VARCHAR2 -- "allow first" or "deny first"
begin_time DATE, -- the time that permission begins
end_time DATE, -- the time that permission ends
ticket_count NUMBER, -- ticket counter for that permission
CONSTRAINT xml_access_pk UNIQUE (docid, principal_name, permission, perm_type),
CONSTRAINT xml_access_ck CHECK (begin_time < end_time)
);