Databases Reference
In-Depth Information
method remotely on the server. A similar option is provided in the O 2
system. In general, the choice concerning the method execution site may be
complex, because different factors must be taken into account, such as the
complexity of the manipulations executed on the object, the references made
to other objects during method execution, the network bandwidth, and the
competition for the network and the server.
7.2.4
Classes and Instantiation Mechanisms
The instantiation is the first reusability mechanism (the second is inheri-
tance) in that it makes it possible to reuse the same definition to generate
objects with the same behavior and structure. Object-oriented data models
provide the concept of class as the instantiation basis. A class is an object that
acts as a template. As such, a class specifies the intended use of its instances
by defining
A structure that is a set of instance attributes (or instance variables);
·
A set of messages that define the external interface;
·
A set of methods that are invoked by messages.
·
In this sense, the class can be viewed as a specification (intention) for its
instances. Because the class factorizes the definitions of a set of objects, it is
also an abstraction mechanism.
Given a class, it is possible to generate through the instantiation mecha-
nism objects that answer all messages defined in the class.
So far, we have implicitly assumed that an object is an instance of only
one class. However, in some models, the instances of a class C are also mem-
bers of the superclasses of C. Note that, as in [9], we distinguish between
the notions of instance of a class and member of a class. An object is
an instance of a class C if C is the most specialized class associated with the
object in a given inheritance hierarchy. An object is a member of a class C
if it is an instance of some subclass of C. Most object-oriented data models
restrict each object to be an instance of only one class, even though they
allow an object to be a member of several classes through inheritance. How-
ever, object-oriented data models [10] can be found allowing an object to be
an instance of several classes.
In addition to acting as a template, in some systems the class denotes
also the collection of all its instances, that is, its extension. That is important
because the class becomes the base on which queries are formulated. The
Search WWH ::




Custom Search