Databases Reference
In-Depth Information
A type has an external specification and one or more implementations.
The external specification is an abstract description of the type, independent
of the implementation. ODL provides the following constructs to support
the external specification: interface, class, and literal.
An interface definition is a specification that defines only the abstract
behavior of an object type. The class definition is a specification that
defines the abstract behavior and the abstract state of an object type. A
literal definition defines only the abstract state of a literal type. [3]
The implementation of an object type has to be done by a language binding.
7.4.3
Subtypes and Inheritance
The ODMG data model supports the type-subtype relationship often
referred to as an is-a relationship or a gen-spec relationship, where the
supertype is the more general type and the subtype is the more specialized
one. The ODMG data model supports two different kinds of inheritance
relationships:
The is-a relationship (represented by a colon) defines the inheri-
tance of behavior between object types, either interfaces or classes.
·
The EXTENDS relationship (represented by the word extend ) refers
to the inheritance of state. It applies only to object types; thus, only
classes and not literals may inherit state.
·
The ODMG data model supports simple inheritance and multiple
inheritance of object behavior. The EXTENDS relationship is a single
inheritance relationship between classes.
7.4.4
Extents
The extent of a type is the collection of all objects (often called instances)of
the type. It is similar to the table in a relational database. The extent defini-
tion is optional in the ODMG data model; if it is not explicitly defined, the
system will not maintain the extension.
If the type A is a subtype of B, then every instance of the type A must
also be an instance of the type B; moreover, the extent of A must be a subset
of the extent of B.
Search WWH ::




Custom Search