3.
Architecture of ORDBMS and OODBMS
OODBMS (Object-Oriented Database Management System):
• Direct support for objects from programming languages.
• Allows storing persistent objects directly from application programs.
• Tight coupling with languages like C++, Java.
Architecture Components:
• Object Store: Stores complex objects.
• Query Engine: Supports object-oriented queries.
• Persistence Manager: Maintains object state between sessions.
ORDBMS (Object-Relational Database Management System):
• Extends the relational model with object-oriented features.
• Combines the reliability and maturity of RDBMS with the flexibility of OODBMS.
Architecture Components:
• Relational Engine: Manages traditional SQL operations.
• Object Extensions: Support for user-defined types (UDTs), inheritance, methods.
• Query Processor: Handles extended SQL with object features.
4. OOD Modeling (Object-Oriented Data Modeling)
Object-Oriented Data Modeling (OODM) is the process of designing a database schema using
object-oriented principles.
Modeling Elements:
• Classes with attributes and operations.
• Relationships such as inheritance, aggregation, and association.
• Encapsulation of data and behavior in objects.
• Generalization and Specialization for hierarchical modeling.
Benefits:
• Improved semantic representation of data.
• Natural mapping from programming objects to database objects.
• Supports complex and multimedia data.
5. ORD Modeling (Object-Relational Data Modeling)
Object-Relational Data Modeling (ORDM) combines relational database concepts with object-
oriented features.
Key Concepts:
• Tables with object types: Columns can store UDTs or even objects.
• Inheritance: Derived tables or types from parent ones.
• Type constructors: Define complex structures like arrays, sets, references.
• Encapsulation: Functions and procedures can be stored with types.
Example:
A Person type can be extended to Employee and Customer types in the database.
CREATE TYPE Person AS OBJECT (
name VARCHAR2(50),
address VARCHAR2(100)
);
CREATE TYPE Employee UNDER Person (
emp_id NUMBER,
dept VARCHAR2(20)
);
6. Specialization, Generalization, Aggregation, and Associations
Specialization:
• Creating subclasses from a superclass based on distinguishing characteristics.
• Example: Person → Student, Employee.
Generalization:
• Merging multiple classes into a single superclass.
• Example: Car, Bike → Vehicle.
Aggregation:
• Represents a “has-a” relationship.
• Example: A Department has Professors.
Association:
• A general binary relationship between classes.
• Can include multiplicity, direction, and roles.
• Example: Doctor treats Patients.
7. Object Query Language (OQL)
OQL (Object Query Language) is a standard query language designed for object-oriented
databases (OODBMS). It is analogous to SQL in relational databases but is tailored to work with
objects instead of tables and rows.
Key Features:
• Object-Oriented: Works with objects, classes, inheritance, and relationships, not just flat
tables.
• Syntax Similar to SQL: Queries resemble SQL but are extended to handle object structures.
• Navigational Queries: Supports object navigation using dot notation ([Link]).
• Method Support: Can invoke methods defined in classes within queries.
• Strongly Typed: Operates with class and type information defined in the object schema.
Example:
SELECT [Link] FROM Student s WHERE [Link] > 20;
• Student is a class, and name, age are object attributes.
8. Object-Relational Concepts
An Object-Relational Database Management System (ORDBMS) bridges the gap between
traditional Relational DBMS and Object-Oriented DBMS, extending relational models with
object-oriented features.
ORDBMSs add support for the following:
User-Defined Types (UDTs):
• Enables creation of custom data types that can encapsulate both:
• Structure (attributes)
• Behavior (methods)
CREATE TYPE Address AS OBJECT (
street VARCHAR2(100),
city VARCHAR2(50),
zip VARCHAR2(10)
);
Inheritance:
• Allows one type to inherit attributes and methods from another.