0% found this document useful (0 votes)
9 views10 pages

Natnael Gulma Section 1

The document discusses the evolution and significance of object databases (ODBs) as an advanced alternative to traditional database models, highlighting their ability to efficiently manage complex data structures. It explains key object-oriented concepts such as abstraction, encapsulation, and polymorphism, which enhance data organization and manipulation. Additionally, it covers the importance of object identity, structure, and type constructors in representing real-world entities within ODBs.

Uploaded by

natigulam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Natnael Gulma Section 1

The document discusses the evolution and significance of object databases (ODBs) as an advanced alternative to traditional database models, highlighting their ability to efficiently manage complex data structures. It explains key object-oriented concepts such as abstraction, encapsulation, and polymorphism, which enhance data organization and manipulation. Additionally, it covers the importance of object identity, structure, and type constructors in representing real-world entities within ODBs.

Uploaded by

natigulam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

HARAMAYA UNIVERSITY

COLLEGE OF COMPUTING AND INFORMATICS


DEPARTMENT OF COMPUTER SCIENCE

ADVANCED DATABASE MANAGEMENT SYATEMS

NAME: NATNAEL GULMA


ID: 2172/16
SECTION:1

Submitted To Mr . BAHAR H.
Haramaya, Ethiopia
MARCH 31. 2025GC

Page | 1
The Evolution and Significance of Object Databases

Initially referred to as object-oriented databases (OODBs), object


databases (ODBs) emerged as an advanced alternative to traditional
database models. While network, hierarchical, and relational databases
have been widely used for business applications, they present
limitations when handling complex systems such as engineering,
manufacturing, biological research, telecommunications, geographic
information systems, and multimedia storage.

Object databases were specifically developed to overcome these


challenges by allowing intricate object structures to be stored and
managed efficiently. One of their key strengths lies in their ability to
define both the composition of complex objects and the functions that
operate on them. This feature enhances data organization and
manipulation, providing developers with greater flexibility.

The growing adoption of object-oriented programming languages,


such as Java and C++, has also contributed to the development of ODBs.
Traditional databases often require additional effort to integrate with
object-oriented applications, whereas object databases are built to work
seamlessly within these programming environments. This compatibility
simplifies database management and improves software performance.

Overview of Object-Oriented Concepts


Object-oriented principles provide a framework for structuring and
manipulating data in object-oriented databases (OODBs). These
databases model real-world entities using objects, classes, and the
relationships among them, resulting in systems that are intuitive,
modular, and scalable.
✓ Objects and Classes
Objects:-Objects represent real-world entities by encapsulating
both data and behavior. An object contains attributes (which hold the
data) and methods (which define the actions that the object can
perform).
For example, consider a scenario where an object represents an animal.
Each animal object contains data such as species, age, and weight, along
with behaviors such as eating, sleeping, or moving. Objects are the

Page | 2
building blocks of OODBs and provide a natural way to model complex
systems.
• Classes:-a class serves as a blueprint for creating objects. It
outlines the structure and behavior that the objects instantiated
from it will have. A class defines a set of attributes and methods,
establishing a common template.
For instance, a class called Animal might specify that every animal object
should have attributes like species, color, and age, as well as methods
such as eat() and move(). By instantiating this class, multiple unique
objects (e.g., different animals such as a dog, cat, or bird) can be created,
each with its own distinct state but sharing common behaviors defined
by the class.
Key Principles of Object-Oriented Databases (OODB)
Object-oriented databases are built around several key principles that
enhance the way data is modeled, stored, and managed.

1. Abstraction:- is the process of hiding complex implementation


details while exposing only the essential features of an object. This
principle reduces system complexity by allowing users to interact
with a simplified interface rather than dealing with underlying
details.
Example: A Car object might include a startEngine() method. The user
can start the car by calling this method without needing to understand
the intricate details of how the engine operates.

2. Encapsulation:refers to bundling data (attributes) and operations


(methods) into a single unit (an object) while restricting direct
access to some of its components. This promotes data security
and integrity by ensuring that an object’s internal state can only
be modified in controlled ways.
Example: In a banking system, a BankAccount object encapsulates the
account balance and provides methods such as deposit() and withdraw()
to modify it. The balance attribute is hidden from direct access,
preventing unauthorized changes.

3. Modularity:- involves decomposing a system into smaller,


independent components (modules) that can be developed,
tested, and maintained separately. Each module can encapsulate
its own functionality, leading to easier development and reuse
across different parts of the system.

Page | 3
Example: A Library Management System can be divided into separate
modules like User Management (handling member information), Book
Management (managing book details), and Borrowing System
(processing checkouts and returns). This separation allows developers to
update one module without impacting the others.
4. Polymorphism: allows objects of different types to be treated as
objects of a common super type, enabling the same operation to
behave differently on different classes. It enables a single function
or operator to work in different ways depending on the type of
object it is applied to
Example: Consider a draw() method in a graphics application. If draw() is
called on a Circle, it renders a circle; if it is called on a Square, it renders
a square. The underlying implementation varies based on the object’s
type, yet the same method name is used for all.
Real-World Modeling with OODBs

Object-oriented databases are particularly effective because they


map directly to real-world entities. Rather than distributing data across
multiple tables as in relational databases, OODBs encapsulate all
information related to an entity within a single object. This direct
correspondence makes the system easier to understand and maintain.

For example, imagine a system that manages a zoo’s information. A


ZooAnimal object might include attributes such as species, habitat, and
diet, along with methods to record feeding schedules, health checks, and
movement patterns. The object-oriented approach allows these data
points and operations to be grouped logically, making it simple to
update and retrieve an animal’s information without needing to join
data from various tables.
✓ Object Identity:
A primary objective of an object-oriented database (ODB) is to
establish a one-to-one mapping between real-world entities and their
corresponding representations in the database. This is achieved by
assigning a distinct identity to every object stored, usually through a
unique, system-generated object identifier (OID). Although the OID
might not be visible to end users, it is critical for internal operations,
enabling the system to uniquely distinguish objects and manage
references between them.

Page | 4
Key requirements for an OID include:

✓ Immutability:- Once an OID is assigned to an object, it must


never change. This constancy preserves the true identity of
the real-world entity, ensuring that even if an object's
attributes are modified, its identity remains constant.

✓ Uniqueness:-Each OID should be unique and should not be


reused, even if the corresponding object is deleted from the
database. This prevents confusion that could arise from
assigning the same identifier to different objects over time.

These characteristics guarantee that an OID does not rely on the


object's attribute values—since those might change—but instead
provides a stable reference. Unlike relational databases, where a
primary key might change (leading to a different identity even for the
same entity), an ODB’s OID remains fixed.

Although early systems sometimes used an object’s physical storage


address as its identifier for retrieval efficiency, such an approach is
problematic because the physical address can change due to
reorganization. Modern systems commonly use long integers as OIDs,
employing a mapping mechanism (such as a hash table) to resolve the
current storage location.

❖ Object Structure

In an object-oriented database, an object’s structure is designed to


comprehensively capture all the information necessary to represent a
real-world entity. This is in contrast to traditional database systems,
where data representing a single complex object might be fragmented
across multiple tables or records.

An object’s structure is defined by:

✓ Attributes (Data Members):-are the fields that hold an object’s


data. Attributes can be simple types like integers or strings, or

Page | 5
they can be complex types, including arrays, lists, or even nested
objects.
✓ Nested Objects:- can include other objects within their structure.
This “has-a” relationship allows the model to naturally represent
the composite nature of many real-world entities.
✓ Relationships: often have associations with one another—such as
aggregations or compositions—which outline how they interact
and depend on each other.

By maintaining the complete structure within a single object, ODBs


preserve a direct and intact correspondence to the real-world objects
they represent, which simplifies querying and data manipulation.

✓ Type Constructors
To manage the complexity of object structures, ODBs use type
constructors to build more complex types from simpler ones. These
constructors can be seen as the building blocks for creating the data
types needed to describe objects in the database.

The most fundamental type constructors include:

1. Atom Constructor: is used for the primitive or basic data


types—often called atomic or single-valued types.

Examples include integers, strings, floating-point numbers, Booleans,


and enumerated types. Each value produced by the atom constructor is
considered indivisible.

2. Struct (Tuple) Constructor: sometimes referred to as the


tuple constructor, is used to create composite types or
record types. This constructor combines several
components (attributes) to form a structured type.

For example, one can define a structured type for a person’s name as a
tuple with fields like First Name, Middle Initial, and Last Name. In many
cases, the struct constructor acts as a type generator, capable of
producing various structured types based on the components provided.

3.Collection (Multivalued) Constructors:- these constructors


allow for the representation of collections of values or objects.

Page | 6
✓ Common collection constructors include:

Set(T): Produces a collection of distinct elements, ensuring no duplicates.

Bag(T): Similar to a set, but permits duplicate elements.

List(T): Creates an ordered collection of elements, where the order is


significant.

Array(T): Functions like a list but typically has a fixed maximum size.

Dictionary(K, T): Forms a collection of key-value pairs, where each key is


associated with a specific value.

All elements within a particular collection must be of the same type.


For instance, a set of strings can only contain string values, and a list of
employees must consist solely of employee objects. While the atom and
struct constructors are reminiscent of the basic types available in the
relational model, collection constructors extend the model by enabling
the creation of complex, nested, and ordered data structures.

This revised explanation maintains the original ideas regarding object


identity, object structure, and type constructors while presenting them
in a new and clear form.

Encapsulation of operations, methods, and persistence

✓ Encapsulation of Operations: The concept of encapsulation is one


of the main characteristics of OO languages and systems. It is also
related to the concepts of abstract data types and information
hiding in
programming languages. In traditional database models and systems this
concept was not applied, since it is
customary to make the structure of database objects visible to users and
external programs. In these traditional models, a number of generic
database operations are applicable to objects of all types.

✓ For example: in the relational model, the operations for selecting,


inserting, deleting, and modifying tuples are generic and may be
applied to any relation in the database. The relation and its
attributes are visible to users and to external programs that access
Page | 7
the relation by using these operations. The concept of
encapsulation is applied to database objects in ODBs by defining
the behavior of a type of object based on the operations that can
be externally applied to objects of that type. Some operations
may be used to create (insert) or destroy (delete) objects; other
operations may update the object state; and others may be used
to retrieve parts of the object state or to apply some calculations.
Still other operations may perform a combination of retrieval,
calculation, and update. In general, the implementation of an
operation can be specified in a general-purpose programming
language that provides flexibility and power in defining the
operations

Type Hierarchies and Inheritance


❖ Simplified Inheritance Model

One of the key features of object-oriented databases (OODBs) is


their support for type hierarchies and inheritance. In this simplified
model, both attributes and methods are treated uniformly as
"functions," since attributes can be viewed as functions with zero
arguments. Inheritance enables the creation of new types by extending
existing ones, forming a hierarchy where common functions are
inherited by subtypes.

A type is defined by a unique name and a list of public functions (which


can be either stored attributes or computed operations). For example, a
basic type for a person might be represented as:

PERSON: Name, Address, Birth_date, Age, Ssn

Here, Name, Address, Ssn, and Birth_date could be stored directly as


data, while Age might be computed dynamically using the Birth_date
and the current date.

When a new type closely resembles an existing one but with additional
or modified functions, it is declared as a subtype of that base type (or
supertype). For instance, if we want to define two new types, EMPLOYEE
and STUDENT, which both include all the attributes of PERSON plus extra
functions, we can specify:

Page | 8
EMPLOYEE subtype-of PERSON: Salary, Hire_date, Seniority
STUDENT subtype-of PERSON: Major, Gpa

➢ In this example, both EMPLOYEE and STUDENT inherit the


functions Name, Address, Birth_date, Age, and Ssn from PERSON.
They then add their own unique functions: Salary, Hire_date, and
Seniority for EMPLOYEE, and Major and Gpa for STUDENT. These
additional functions might be implemented as stored data or as
operations that compute values (such as calculating Seniority from
Hire_date or deriving Gpa from internal grade records).

Polymorphism of Operations (Operator Overloading)


Another important concept in OO systems is polymorphism, often
referred to as operator overloading. This allows the same operator or
function name to be used for different implementations, depending on
the types of the objects involved.

✓ For instance, the operator “+” may perform integer addition when
applied to numbers, floating point addition when used with real
numbers, or even a set union when applied to collections. The
compiler or runtime system determines the appropriate operation
based on the types of the operands.

Multiple and Selective Inheritance

• Multiple Inheritance:-Sometimes a new type needs to inherit


characteristics from more than one base type.

For example, an ENGINEERING_MANAGER might be designed as a


subtype that inherits from both MANAGER and ENGINEER. This creates
a more complex structure known as a type lattice, rather than a simple
hierarchy.

✓ Selective Inheritance:-In certain cases, a subtype might require


only a subset of the functions from its supertype, leaving out
others. Although not commonly supported in object-oriented
databases, selective inheritance allows the subtype to explicitly
exclude specific functions—often using an “EXCEPT” clause. This
mechanism is more frequently encountered in artificial
intelligence and related fields.

Page | 9
Page | 10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy