In order to support versions, the attributes of an OPM class are partitioned into non-versioned and versioned attributes. Non-versioned attributes describe the stable (non evolving) part of an object (such as the name of a person), while versioned attributes describe the changing (evolving) part of an object (such as the address of a person). A version of an object x consists of the values of the generic attributes for x (common to all versions of x) and the values of versioned attributes for a specific version of x.
The syntax for OPM schemas is extended as follows in order to incorporate versioned attributes for object classes :
<object class> ::= <object class> <object attributes>
<versioned attributes>
;
<versioned attributes> ::= <null>
| VERSIONED <object attributes>
;
An object with multiple versions has a default (current) version which is explicitly selected from the set of persistent versions of that object.
Note that attribute cardinality constraint on a versioned attribute restricts attribute values per version. For example, version attribute address of class PERSON with attribute cardinality constraint [0,3] means that each version of a person object can have at most 3 addresses.
A versioned abstract attribute can refer to either generic objects or (specific) object versions. Values of an abstract attribute with generic references are represented by the default versions of the generic objects this attribute references. Therefore, value classes for versioned abstract attributes are extended to:
<abstract class list> ::= <generic or specific> <class name list>
;
<generic or specific> ::= <null>
| specific
;
<class name list> ::= <class name>
| <class name list> or <class name>
;
In the following example, class MAP has attributes MapNr, Name, Owner, and Citation, where Owner and Citation are versioned, Owner refers to generic objects of PERSON, Citation refers to specific versions of CITATION, transient versions are allowed, and the derivation is of type chain:
OBJECT CLASS MAP
ID: MapNr
ATTRIBUTE MapNr: [1,1] CHAR(10)
ATTRIBUTE Name: [0,1] VARCHAR(80)
VERSIONED
ATTRIBUTE Owner: [0,1] PERSON
ATTRIBUTE Citation: specific [0,1] CITATION