- Metaclasses
There are four system defined metaclasses:
DATABASES,
CLASSES,
SCLASSES, and
SPROTOCOLS.
Users are not allowed to change the content of these metaclasses.
- Controlled Value Classes
A controlled value class either consists of enumerated atomic
string values or numeric ranges, but not both.
A range is either a number or an interval specified by
lower and upper bounds.
- Classes
- There are six mutually exclusive types of classes:
- primitive value classes
(e.g., INTEGER, CHAR(n), etc.);
- controlled value classes;
- base object classes;
- specialization object classes
(subclasses of base object classes);
- atomic (non-expandable) protocol classes; and
- expandable protocol classes.
- Class names are globally distinct.
- Superclasses of a specialization object class must be
base object classes or other specialization object classes.
- Each specialization hierarchy forms a
directed acyclic graph.
- Base object classes and protocol classes can be
associated with identifier attributes.
- Specialization object classes
can either have explicitly specified identifier attributes,
or inherit the identifiers from their generic (super) classes.
- If a subclass
is specified as: isa*
,
then
cannot have common instances with other subclasses
of
(that are not subclasses of
).
- A protocol expansion consists of only atomic protocol classes
and/or expandable protocol classes.
- A protocol expansion graph is acyclic, that is,
if a protocol class
is involved in the expansion of
protocol class
, then
cannot be involved in the expansion
or any sub-protocols of
.
- Attributes
- All local attributes of a class must have distinct names.
- User specified object or protocol attribute names
cannot be identical to OWNER or STATUS attribute names.
- Inherited attributes in a subclass are overridden
by local attributes with the same names.
- The name for a tuple tuple attribute is optional.
However, each component attribute in the tuple tuple
must have a distinct name.
- Nested tuple tuple attributes are not allowed.
- A simple or component attribute can only be specified as the inverse
of another non-derived simple (single-valued or set-valued) attribute.
- Attributes with list of values cannot be associated
with inverse constraints.
- Value Classes
- Each attribute must be associated with a value class.
- A value class of a simple or component attribute can
be of one of the following six types:
- a controlled value class;
- a primitive value class;
- a user defined type (or named primitive value class);
- a single object class, or a union of several object classes;
- a single protocol class, or a union of several protocol classes;
- CLASSES system metaclass.
- Identifiers
- A specialization class can either have an explicitly defined
identifier, or inherit identifier(s) from its superclass(es).
- An identifier can consist of one or more simple, tuple
or component attributes.
- Identifier attributes must be specified as not null,
and single-valued.
- If an attribute identifier of class
is
associated with another class
as its value class,
then
is said to be id-dependent on
.
A class
cannot be id-dependent on
another class
if
is (transitively)
id-dependent on
, that is, id-dependency graphs must be acyclic.
- Identifier attributes cannot be specified as
input, output or derived attributes.
- Either an entire tuple attribute is
an object identifier,
or none of the component attributes in the tuple
are part of an identifier.
- Representative Attributes
- Each class can have a set of simple or component attributes
to be specified as its representative ( REP) attributes.
- A specialization class will inherit REP attributes from
its superclasses if this class does not have explicitly specified
REP attributes.
- Each REP attribute must be single-valued.
- Input and Output Attributes
- Input and output attributes can be associated only with protocol
classes.
- Input or output attributes must be simple attributes
that are not specified as attribute identifiers
nor as derived attributes.
- If a protocol P is specified as expanded into
several sub-protocols, then the input attributes
of P must be subsets of input attributes of
the sub-protocols, and the output attributes of P
must be subsets of output attributes of the sub-protocols.
(Some input/output attributes can be hidden from
the higher level protocol.)
- Input and output attributes of sub-protocols
are related to input and output attributes of
higher level protocol using
input is-a
, and output is-a
statements.
- Input and output connections between sub-protocols
are specified using input from
via
statements.
If attribute A is an input attribute of protocol class
,
and the specification for A contains an input statement of the form
input from
via
,
,
,
then
- If
is a sub-protocol of protocol class
involved in the expansion of
,
then
must also be a sub-protocol of
involved in the same protocol expansion,
and
must immediately precede
in the protocol expansion.
-
must be an output attribute of
.
- For every
,
:
must be a simple or component attribute of class
,
where
is a value class of attribute
.
- Derived Attributes
Derived simple attributes can be defined using one and only one
of the following derivation rules:
- attribute composition;
- arithmetic expression;
- aggregate functions; or
- user specified.
- Arithmetic Expression or Aggregate Function Derived Attributes
- A derived attribute A of object or protocol
that is
specified using an arithmetic expression or an aggregate function,
must be a simple, non-identifier attribute.
Additionally, if
is a protocol class, then A cannot be
specified as an input or output attribute of
.
- An arithmetic expression involved in the specification
for derived attribute A of object or protocol class
can involve operators, constants, and
other single-valued non-derived numeric (simple or component)
attributes of
.
- An aggregate function involved in the specification
for derived attribute A of object or protocol class
can involve only multi-valued non-derived (simple or component)
attributes of
, or composition path derived attributes of
.
Aggregate functions min, max, sum and average
can be applied only to numeric attributes
(i.e., attributes associated with primitive numeric value classes).
- Attribute Composition Derived Attributes
- Only locally defined (i.e., not inherited),
non-derived,
simple or component attributes can be involved
in attribute compositions.
- A simple attribute A of object or protocol class
can be associated with an attribute composition derivation
consisting of one or (union of) several paths specifications of
the following form:
[
]
[
]
[
], where
- each
(1
k
n) is an object or
a protocol class name;
- each
(1
k
n)
is either an attribute name or an attribute name
preceded by ``!'' (indicating an attribute inverse), and
- If
is the name of an attribute, C, not preceded by ``!'',
then C must be a non-derived, simple or component
attribute that is explicitly associated (i.e., not inherited)
with (a)
if k =1 or (b)
if
;
- If
is the name of an attribute, C, preceded by ``!'',
then C must be a non-derived, simple or component
attribute that is explicitly associated (i.e., not inherited)
with
.
- Versions
- Identifier attributes cannot be versioned attributes.
- A non-versioned abstract attribute can refer only to
generic objects
(therefore keyword ``specific'' cannot be used in value class
definition for non-versioned attributes.)
- A non-versioned abstract attribute cannot be specified as
an inverse of a versioned attribute;
a versioned abstract attribute cannot be specified as
an inverse of another attribute.
- Derivation for non-versioned arithmetic or aggregate function
derived attributes can consists of only non-versioned local attributes,
and derivation for versioned arithmetic or aggregate function
derived attributes can consist of only versioned local attributes.
- Permissions
- If a schema supports permission modeling,
then both OWNER and STATUS attributes must be specified.
- The OWNER attribute is a single-valued, abstract, non-null
attribute that can be associated with an optional attribute
description, an optional attribute example specification,
and optional domain-specific properties.
- The STATUS attribute is a single-valued, controlled or primitive,
non-null attribute that can be associated with optional attribute default,
description, example speciification and domain-specific properties.
The STATUS attribute must be associated with integer
base data type; an object is considered as released
if its status value is greater than 0, otherwise it is
non-released.
- OWNER attribute and STATUS attributes must have
distinct names; they cannot be the same as any user-specified
attribute names defined in this schema.
- All object classes belonging to the
same class hierarchy must all be specified with permissions on or off.
- Attribute inverse constraints are not allowed
in a schema that supports permission modeling.