Chapter_1.- OODB Additional
Chapter_1.- OODB Additional
Object-Oriented Concepts
Object Identity
Object Structure
Type Constructors
Encapsulation
Methods, and Persistence
Type Hierarchies and Inheritance
• Objects are self-contained units that contain both data and the operations or
methods that can be performed on that data. It helps in efficient representation and
management of complex data structures and relationships.
• Object-oriented databases are often used in applications that require the efficient
management of complex data structures and relationships, such as CAD/CAM
systems, geographic information systems, and document management systems.
• They are also well suited for applications that require the integration of different
data types and sources, such as multimedia data or data from multiple sources.
Objects
• For example, an object could contain a customer’s name, address, and account
balance data along with methods to modify or retrieve that data.
• Objects enable encapsulation of both state through data attributes and behavior
through methods. This provides a cohesive and modular approach to structure
data.
• Classes act as templates or blueprints for creating objects with the same
kinds of data and behaviors. A class defines the structure for its instances
what attributes or data members the object will contain as well as what
methods or functions it will have.
• Classes allow for organization of objects that share similar properties and
behaviors. This promotes reusability and maintainability in database design.
Inheritance
• Inheritance allows classes to inherit attributes and methods from parent
classes. This enables code reuse and the creation of specialized child
classes.
• The class hierarchy represents these parent-child relationships. A base or
superclass provides common data and behaviors shared by derived
subclasses down the hierarchy. Subclasses can override or extend parent
functionality.
Attributes
Encapsulation
Transactions
Key features:
Versant
• Key features:
• This can increase the time and resources required to develop and
maintain applications that use an object-oriented database.
Inherent Identity: Object Identity is often inherent in the object itself and
is not dependent on external factors.
Object Structure refers to the way in which data and methods are
organized within an object. It encompasses the attributes (data) and
methods (functions) that define the behavior of the object.
The organization of data and methods within an object is fundamental to
the encapsulation principle of object-oriented programming.
• Encapsulation ensures that an object's internal representation is hidden from
the outside world, and interaction with the object is performed through well-
defined interfaces.
Attributes: Attributes represent the data associated with an object. Each object
has a set of attributes that define its state. These attributes can be of various data
types and may include simple types (integers, strings) or more complex types
(other objects).
Type Constructors are mechanisms in OODBs that define and create types
or classes. They specify how objects of a particular type should be
constructed, including their attributes and methods.
Type Constructors play a crucial role in the schema definition of the
database. They define the blueprint for creating objects, ensuring
consistency and structure across instances of the same type.
• Type Constructors support features such as inheritance, allowing for the
creation of new types based on existing ones.
Significance:
Common Characteristics: The base type contains characteristics common to
all its derived types.
Generalization: It allows for the generalization of shared attributes and
behaviors.
12/14/2024 Object-Oriented Database 52
Cont. …
Significance:
Specialization: The derived type specializes the base type by adding specific
attributes or behaviors.
• The derived types can inherit these attributes and methods and
introduce their own specific attributes.
• Key Characteristics:
• Key Characteristics:
• Type Constructors enable the creation of custom data types that encapsulate
object structures.
• They provide a means for defining classes or types within the database
schema, similar to object-oriented programming.
2.Focus:
1. Object Identity: Focuses on uniquely identifying objects.
2. Object Structure: Focuses on organizing data within objects.
3. Type Constructors: Focus on defining data types for objects.
• Level of Abstraction:
Object Identity: Represents a low-level detail, identifying
individual objects.
Object Structure: Represents a mid-level detail, specifying the
attributes and properties of objects.
Type Constructors: Represent a higher-level detail, defining
custom data types encapsulating object structures.