DDB Module-5 Mid-2 Notes Q and A 10-12-2024
DDB Module-5 Mid-2 Notes Q and A 10-12-2024
MODULE – V
Distributed object Database Management Systems: Fundamental object concepts and models,
object distributed design, architectural issues, object management, distributed object storage,
object query Processing.
Object Oriented Data Model: Inheritance, object identity, persistent programming languages,
persistence of objects, comparison OODBMS and ORDBMS
• An object DBMS is a system that uses an “object” as the fundamental modelling and access
primitive.
Object :
• An object represents a real entity in the system that is being modeled.
• Most simply, it is represented as a tiple {OID, state, interface}, in which OID is the object identifier, the
corresponding state is some representation of the current state of the object, and the interface defines the
behavior of the object.
• Object identifier is an invariant property of an object which permanently distinguishes it logically and
physically from all other objects, regardless of its state.
• The state of an object is commonly defined as either an atomic value or a constructed value (e.g., tuple
or set).
Example 1. Consider the following objects:
(i1, Volvo)
(i2, [name: John, mycar: i1])
(i3, [name: Mary, mycar: i1])
Composition (Aggregation)
• Composition is one of the most powerful features of object models.
• It allows sharing of objects, referred as referential sharing, since objects “refer” to each other by their
OIDs as values of object-based attributes.
then this indicates that John and Mary own the same car.
•
The preferred architectural model for object DBMSs has been client/server.
•
The design issues related to these systems are somewhat more complicated due to the characteristics of
object models.
The major concerns are listed below.
1. Since data and procedures are encapsulated as objects, the unit of communication between the clients
and the server is an issue.
The unit can be a page, an object, or a group of objects.
2. Closely related to the above issue is the design decision regarding the functions provided by the clients
and the server.
2 P. V Ramana Murthy
LEE; B.E(Comp); M.Tech(CS); (Ph.D(CSE));
Malla Reddy Engineering College (Autonomous)
III Year I Sem - CSE Distributed Databases - Class Notes 2024-2025
This is especially important since objects are not simply passive data, and it is necessary to consider the
sites where object methods are executed.
3. In relational client/server systems, clients simply pass queries to the server, which executes them and
returns the result tables to the client. This is referred to as function shipping.
• In object client/server DBMSs, this may not be the best approach, as the navigation of
composite/complex object structures by the application program may dictate that data be moved to
the clients (called data shipping systems).
• Since data are shared by many clients, the management of client cache buffers for data consistency
becomes a serious concern.
• Client cache buffer management is closely related to concurrency control, since data that are cached
to clients may be shared by multiple clients, and this has to be controlled.
• Most commercial object DBMSs use locking for concurrency control, so a fundamental architectural
issue is the placement of locks, and whether or not the locks are cached to clients.
4. Since objects may be composite or complex, there may be possibilities for prefetching component
objects when an object is requested.
• Relational client/server systems do not usually prefetch data from the server, but this may be a valid
alternative in the case of object DBMSs.
Avoidance-based algorithms prevent the access to old cache data by ensuring that clients cannot update an
object if it is being read by other clients.
• So they ensure that old data never exists in client caches.
Detection-based algorithms allow access of old cache data, because clients can update objects that are being
read by other clients.
• However, the detection-based algorithms perform a validation step at commit time to satisfy data
consistency requirements.
3 P. V Ramana Murthy
LEE; B.E(Comp); M.Tech(CS); (Ph.D(CSE));
Malla Reddy Engineering College (Autonomous)
III Year I Sem - CSE Distributed Databases - Class Notes 2024-2025
• Among the many issues related to object storage, two are particularly relevant in a distributed
system: object clustering and distributed garbage collection.
• Composite and complex objects provide opportunities, for clustering data on disk such that the I/O
cost of retrieving them is reduced.
• Garbage collection is a problem that arises in object databases due to reference-based sharing.
Object Clustering:
• Object clustering refers to the grouping of objects in physical containers (i.e., disk extents)
according to common properties, such as the same value of an attribute or sub-objects of the same
object.
• Thus, fast access to clustered objects can be obtained.
2. The normalized storage model (NSM) stores each class as a separate relation.
It can be used with logical or physical OID.
However, only logical OID allows the vertical partitioning of objects along the inheritance
relationship.
3. The direct storage model (DSM) enables multi-class clustering of complex objects based on the
composition relationship.
This model generalizes the techniques of hierarchical and network databases, and works best
with physical OID.
It can capture object access locality and is therefore potentially superior when access patterns
are well-known.
The major difficulty, however, is to clustering an object whose parent has been deleted.
• There are analogies between horizontal fragmentation of object databases and their relational
counterparts.
• It is possible to identify primary horizontal fragmentation in the object database case identically to the
relational case.
• Derived fragmentation shows some differences, however.
• In object databases, derived horizontal fragmentation can occur in a number of ways:
In this simple definition of Engine, all the attributes are simple. Consider the partitioning predicates
p1: horsepower ≤ 150
p2: horsepower > 150
• In this case, Engine can be partitioned into two classes, Engine1 and Engine2, which inherit all of their
properties from the Engine class, which is redefined as an abstract class (i.e,. a class that cannot have any
objects in its shallow extent).
6 P. V Ramana Murthy
LEE; B.E(Comp); M.Tech(CS); (Ph.D(CSE));
Malla Reddy Engineering College (Autonomous)
III Year I Sem - CSE Distributed Databases - Class Notes 2024-2025
• The objects of Engine class are distributed to the Engine1 and Engine2 classes based on the value of
their horsepower attribute value.
• One aspect of distributed systems is that objects move, from time to time, between sites. This raises
a number of issues.
• First is the unit of migration. It is possible to move the object’s state without moving its methods.
The application of methods to an object requires the invocation of remote procedures.
• This issue was discussed above under object distribution.
• Even if individual objects are units of migration, their relocation may move them away from their
type specifications and one has to decide whether types are duplicated at every site where instances
reside or the types are accessed remotely when behaviors or methods are applied to objects.
• Three alternatives can be considered for the migration of classes (types):
1. the source code is moved and recompiled at the destination,
2. the compiled version of a class is migrated just like any other object, or
3. the source code of the class definition is moved, but not its compiled operations, for which a
lazy migration strategy is used.
• Another issue is that the movements of the objects must be tracked so that they can be found in
their new locations.
• A common way of tracking objects is to leave surrogates, or proxy objects .
• These are place-holder objects left at the previous site of the object, pointing to its new location.
• Accesses to the proxy objects are directed transparently by the system to the objects themselves at
the new sites.
• The migration of objects can be accomplished based on their current state.
• Objects can be in one of four states:
1. Ready: Ready objects are not currently invoked, or have not received a message, but are
ready to be invoked to receive a message.
2. Active: Active objects are currently involved in an activity in response to an invocation or a
message.
3. Waiting: Waiting objects have invoked (or have sent a message to) another object and are
waiting for a response.
4. Suspended: Suspended objects are temporarily unavailable for invocation.
• Objects in active or waiting state are not allowed to migrate, since the activity they are currently
involved in would be broken.
• The migration involves two steps:
1. shipping the object from the source to the destination, and
2. creating a proxy at the source, replacing the original object.
• Two related issues must also be addressed here. One relates to the maintenance of the system
directory.
• As objects move, the system directory must be updated to reflect the new location.
• This may be done lazily, whenever a surrogate or proxy object redirects an invocation, rather than
eagerly, at the time of the movement.
• The second issue is that, in a highly dynamic environment where objects move frequently, the
surrogate or proxy chains may become quite long.
7 P. V Ramana Murthy
LEE; B.E(Comp); M.Tech(CS); (Ph.D(CSE));
Malla Reddy Engineering College (Autonomous)
III Year I Sem - CSE Distributed Databases - Class Notes 2024-2025
• It is useful for the system to transparently compact these chains from time to time.
• However, the result of compaction must be reflected in the directory, and it may not be possible to
accomplish that lazily.
• Another important migration issue arises with respect to the movement of composite objects.
• The shipping of a composite object may involve shipping other objects referenced by the
composite object.
OODBMS ORDBMS
It stands for Object Oriented Database Management It stands for Object Relational Database
System. Management System
Object-oriented databases, like Object Oriented An object-relational database is one that is based on
Programming, represent data in the form of objects both the relational & object-oriented database
and classes models data in the form of relations which contains
rows and columns
In OODBMS, relationships are via the object In ORDBMS, relationships are represented by
identifier (OID) foreign key attributes.
It handles larger and complex data than RDBMS. It handles comparatively simpler data.
In OODBMS, the data management language is IN ORDBMS there are data manipulation languages
typically incorporated into a programming language such as SQL.
such as C++, C#.
Stored data entries are described as objects. Stored data entries are described as tables.
OODBMSs support ODL/OQL. ORDBMS adds object-oriented functionalities to
SQL
Every object-oriented system has a different set of Keys, entity integrity, and referential integrity are
constraints that it can accommodate. constraints of an object-oriented database.
The efficiency of query processing is low. The efficiency of query processing is quite high.
8 P. V Ramana Murthy
LEE; B.E(Comp); M.Tech(CS); (Ph.D(CSE));
Malla Reddy Engineering College (Autonomous)