next up previous contents
Next: Specialization Object Classes Up: Object Classes Previous: Object Classes

Base Object Classes

A base object class is an object class that can be associated with an object identifier consisting of one or several attributes. Although object identifiers in base object classes are optional, it is advised that each base object class be associated with an object identifier. Identifier attributes must be specified as single-valued and not null; that is, the cardinality constraint for this attribute should be: [1,1]. They cannot be specified as input, output or derived attributes.

Every base object class, , associated with object identifier must satisfy an identification constraint regarding the uniqueness within of the (tuple of) value(s) for identifier attribute(s) for each object of .

A list of single-valued primitive attributes (i.e., REP attributes) can be defined to represent the object instances of this class. By default, object instances in a class are represented by (internal, system generated) object identifiers (oids). Values for attributes in the representation list do not need to be distinct. For example, object class PERSON may have ID attribute ssn, while each person in the class is represented by attribute name.

If permission modeling is specified for this schema, then each object class is considered to have permission mode ON. If permission modeling is not needed for a specific class, then that class can be specified with PERMISSION OFF.

<base object class> ::= OBJECT CLASS <object class name>
                                     <permission mode>
                                     <class description>
                                     <class example>
                                     <domain-specific properties>
                                     <object identifier>
                                     <represented by>
                                     <object class delete rules>
                      ;
<object class name> ::= <class name>
                      ;
<permission mode> ::= PERMISSION OFF
                    | <null>
                    ;
<class description> ::= DESCRIPTION : " <text> "
                      | <null>
                      ;
<class example> ::= EXAMPLE : " <text> "
                  | <null>
                  ;
<object identifier> ::= ID : <attribute list>
                      | ID : ( <comp attribute list> )
                      | <null>
                      ;
<attribute list> ::= <attribute name>
                   | <attribute list> , <attribute name>
                   ;
<represented by> ::= REP : <attribute list>
                   | <null>
                   ;

The following is an example of base object class PROJECT:

OBJECT CLASS PROJECT
   DESCRIPTION: "Defines laboratory projects. 
                A project can have sub-projects and is owned by several owners."
   ID: project_id
   REP: project_id, project_type
   ATTRIBUTE project_id: [1,1] INTEGER
   ATTRIBUTE project_parent: set-of [0,] PROJECT
   ATTRIBUTE project_type: [0,1] PROJ_TYPE
   ATTRIBUTE strategy: STRATEGY
                                 DESCRIPTION: "strategy used"
   ATTRIBUTE owner: set-of [0,] PERSON
                                 ORDER BY owner [PERSON] Name
                                 DESCRIPTION: "owners of this project"