--
-- Each row in the acs_object_types table represents a distinct class
-- of objects. For each instance of any acs_object_type, there is a
-- corresponding row in the acs_objects table. Essentially,
-- acs_objects.object_id supersedes the on_which_table/on_what_id pair
-- that ACS 3.x used as the system-wide identifier for heterogeneous
-- objects. The value of having a system-wide identifier for
-- heterogeneous objects is that it helps us provide general solutions
-- for common problems like access control, workflow, categorppization,
-- and search. (Note that this framework is not overly restrictive,
-- because it doesn't force every type of object to be represented in
-- the acs_object_types table.) Each acs_object_type has:
-- * Attributes (stored in the acs_attributes table)
-- Examples:
-- * the "user" object_type has "email" and "password" attributes
-- * the "content_item" object_type has "title" and "body" attributes
-- * Relationship types (stored in the acs_rel_types table)
-- Examples:
-- * "a team has one team leader who is a user" (in other words,
-- instances of the "team" object_type must have one "team leader"
-- relationship to an instance of the "user" object_type)
-- * "a content item may have zero or authors who are people or
-- organizations, i.e., parties" (in other words, instances of
-- the "content_item" object_type may have zero or more "author"
-- relationships to instances of the "party" object_type)
-- Possible extensions include automatic versioning, logical deletion,
-- and auditing.
--
CREATE TABLE acs_object_types (
object_type varchar(1000) PRIMARY KEY NOT NULL,
--
-- The object_type of which this object_type is a specialization (if
-- any). For example, the supertype of the "user" object_type is
-- "person". An object_type inherits the attributes and relationship
-- rules of its supertype, though it can add constraints to the
-- attributes and/or it can override the relationship rules. For
-- instance, the "person" object_type has an optional "email" attribute,
-- while its "user" subtype makes "email" mandatory.
--
supertype varchar(1000),
--
-- ...
-- If the object_type is not abstract, then all of its attributes must
-- have a non-null storage specified.
--
abstract_p bool DEFAULT false NOT NULL,
pretty_name varchar(100) NOT NULL,
pretty_plural varchar(100) NOT NULL,
--
-- The name of the type-specific table in which the values of attributes
-- specific to this object_type are stored, if any.
--
table_name varchar(30),
--
-- The name of the primary key column in the table identified by
-- table_name.
--
id_column varchar(30),
package_name varchar(30) NOT NULL,
--
-- The name of a stored function that takes an object_id as an argument
-- and returns a varchar2: the corresponding object name. This column is
-- required to implement the polymorphic behavior of the acs.object_name()
-- function.
--
name_method varchar(100),
--
-- Object types (and their subtypes) that require more type-specific
-- data than the fields already existing in acs_object_types may name
-- a table in which that data is stored. The table should be keyed
-- by the associated object_type. For example, a row in the user_group_types
-- table stores a default approval policy for every user group of that type.
-- In this example, the user_group_types table has a primary key named
-- group_type that references acs_object_types. If a subtype of user_groups
-- for example, lab_courses, has its own type-specific data, it could be
-- maintained in a table called lab_course_types, with a primary key named
-- lab_course_type that references user_group_types. This provides the same
-- functionality as static class fields in an object-oriented programming language.
--
type_extension_table varchar(30),
--
-- This flag is used to identify object types created dynamically
-- (e.g. through a web interface). Dynamically created object types can
-- be administered differently. For example, the group type admin pages
-- only allow users to add attributes or otherwise modify dynamic
-- object types. This column is still experimental and may not be supported in the
-- future. That is the reason it is not yet part of the API.
--
dynamic_p bool DEFAULT false,
tree_sortkey varbit(-5),
CONSTRAINT acs_object_types_pk REFERENCES acs_object_types (),
CONSTRAINT acs_object_types_supertype_fk REFERENCES acs_object_types ()
);
CREATE UNIQUE INDEX acs_obj_types_pretty_name_un ON acs_object_types (pretty_name);
CREATE UNIQUE INDEX acs_obj_types_pretty_plural_un ON acs_object_types (pretty_plural);
CREATE INDEX acs_obj_types_supertype_idx ON acs_object_types (supertype);
CREATE INDEX acs_obj_types_tree_skey_idx ON acs_object_types (tree_sortkey);
CREATE UNIQUE INDEX acs_object_types_pkg_name_un ON acs_object_types (package_name);
CREATE UNIQUE INDEX acs_object_types_table_name_un ON acs_object_types (table_name);
CREATE TRIGGER acs_object_type_insert_tr BEFORE INSERT FOR EACH ROW EXECUTE PROCEDURE acs_object_type_insert_tr (disabled)
CREATE TRIGGER acs_object_type_update_tr AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE acs_object_type_update_tr (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610544 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610545 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_1610546 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_1610547 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610549 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610550 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610554 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610555 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610559 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610560 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610564 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610565 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610569 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610570 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610574 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610575 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610579 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610580 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610584 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_cascade_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610585 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610589 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610590 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610594 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610595 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610599 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610600 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610604 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610605 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610609 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610610 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610614 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610615 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610619 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610620 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610624 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610625 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610629 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610630 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610634 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_cascade_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610635 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610639 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_cascade_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610640 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610644 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_cascade_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610645 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610649 AFTER DELETE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_cascade_del (disabled)
CREATE TRIGGER RI_ConstraintTrigger_a_1610650 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_noaction_upd (disabled)
-- Tables with foreign keys that refer to acs_object_types:
--acs_attribute_descriptions(acs_object_types_pk)
--acs_attribute_descriptions(acs_object_types_supertype_fk)
--acs_attributes(acs_object_types_pk)
--acs_attributes(acs_object_types_supertype_fk)
--acs_object_type_tables(acs_object_types_pk)
--acs_object_type_tables(acs_object_types_supertype_fk)
--acs_object_types(acs_object_types_pk)
--acs_object_types(acs_object_types_supertype_fk)
--acs_objects(acs_object_types_pk)
--acs_objects(acs_object_types_supertype_fk)
--acs_rel_types(acs_object_types_pk)
--acs_rel_types(acs_object_types_supertype_fk)
--acs_static_attr_values(acs_object_types_pk)
--acs_static_attr_values(acs_object_types_supertype_fk)
--cr_content_mime_type_map(acs_object_types_pk)
--cr_content_mime_type_map(acs_object_types_supertype_fk)
--cr_folder_type_map(acs_object_types_pk)
--cr_folder_type_map(acs_object_types_supertype_fk)
--cr_items(acs_object_types_pk)
--cr_items(acs_object_types_supertype_fk)
--cr_type_children(acs_object_types_pk)
--cr_type_children(acs_object_types_supertype_fk)
--cr_type_relations(acs_object_types_pk)
--cr_type_relations(acs_object_types_supertype_fk)
--cr_type_template_map(acs_object_types_pk)
--cr_type_template_map(acs_object_types_supertype_fk)
--group_type_rels(acs_object_types_pk)
--group_type_rels(acs_object_types_supertype_fk)
--group_types(acs_object_types_pk)
--group_types(acs_object_types_supertype_fk)
--subsite_callbacks(acs_object_types_pk)
--subsite_callbacks(acs_object_types_supertype_fk)
--wf_workflows(acs_object_types_pk)
--wf_workflows(acs_object_types_supertype_fk)
--workflows(acs_object_types_pk)
--workflows(acs_object_types_supertype_fk)
-- Table size: 24,576 bytes
-- Table rows: 120
Tables: