Database Reference
In-Depth Information
Table 4. Entity Definition and Instantiation in
EXPRESS
with another entity A which has only one integer
attribute. att_1 is an inverse attribute of entity A,
corresponding to the inverse link defined by attri-
bute att_3 in entity B. Entities may have instances.
Each entity has an identifier. The attribute values
are either literal values of the EXPRESS simple
or structured built-in types or they are references
to other entity instances.
An example of the model extension associ-
ated to the previous entity definitions is shown
in the same table. The #2 instance of the entity
B, where att_1 evaluates to 4.0, att_2 is the list
('hello', 'bye') and att_3 points the particular in-
stance #1 of the entity A where its att_A attribute
evaluates to 3.
Multiple inheritance. Inheritance (single and
multiple) is introduced by the SUPERTYPE and
SUBTYPE EXPRESS keywords. The SUBTYPE
clause occurring in an entity E is followed by the
enumeration of the set of entity names represent-
ing the superclasses of E.
Constraining entities . It is possible to limit
the allowed set of instances of the data models
to those instances that satisfy some stated con-
straints. EXPRESS uses first order logic which
is completely decidable since the set of instances
is finite. Constraints are introduced thanks to the
WHERE clause that provides for instance invari-
ant, and to the global RULE clause that provides for
model invariant. Derivations and constraints are
the only places where functions may occur. They
are inherited. Set inclusion defines the semantics
of the EXPRESS inheritance mechanism.
Graphical representation. To help the user
to understand the EXPRESS data models, the
EXPRESS-G graphical representation has been
defined. It represents the structural and descrip-
tive constructs of the EXPRESS language (classes
and attributes) but the procedural constructs
(derivation and rules) are not represented. The
example of Figure 2 illustrates an EXPRESS-G
representation of a simple data model related to
geometrical entities.
In this example, a geometric entity can be
Entity Definition
ENTITY A; ENTITY B;
att_A(?):INTEGER; att_1:REAL;
INVERSE ; att_2: LIST [0:?] OF STRING;
att_1:B FOR att_3; att_3:A;
END ENTITY; END ENTITY;
Entity Instance
# 1=A(3);
# 2=B(4.0,('HELLO','BYE'), #1);
The Express Data
Modelling Language
EXPRESS is a data modelling language that com-
bines ideas from the entity-attribute-relationship
family of modelling languages with object model-
ling ideas of the late 1980s. It became an interna-
tional standard (ISO 10303-11) in 1994.
The major advantage of this language is its
capability to describe structural, descriptive and
procedural concepts in a common data model
and semantics. This integration avoids the use of
several models and languages that require bridg-
ing over the gap between all the defined models
(like in UML). A data model in EXPRESS is
represented by a set of schemas that may refer to
each other. Each schema contains two parts. The
first part is a set of entities that are structured in
an object-oriented approach (supporting multiple
inheritances). The second part contains proce-
dures, functions and global rules used to express
constraints.
Entity definition. Entities are named and
defined by a set of attributes (which may be an
empty set) assigned to each entity. Each attribute
has a domain (where it takes its values) defining a
data type. It can be either a simple (e.g., integer,
string) or a structured (e.g., lists, sets, bags) do-
main or an entity type meaning that an attribute
is a type of another entity.
Table 4 shows the entity B with three attri-
butes: a real, a list of strings and a relationship
 
Search WWH ::




Custom Search