In traditional Relational Database Management Systems (RDBMS), data is stored in tables (relations), and the model is based on first normal form (1NF) — i.e., atomic data values. While relational models are powerful, they have limitations in handling complex data types like multimedia, engineering designs, geographic data, etc.
To overcome these limitations, advanced data models were developed, such as:
These models combine the strengths of object-oriented programming and relational databases to support more complex applications.
An Object-Oriented Data Model integrates object-oriented programming concepts with database technology. It treats data as objects (similar to object-oriented programming languages like Java or C++), supporting features like inheritance, encapsulation, and polymorphism.
An Object-Relational Data Model is a hybrid model that extends the relational model by integrating object-oriented features. It combines the simplicity and standardization of relational databases with the power and flexibility of object-oriented concepts.
Most modern RDBMSs support object-relational features, such as:
| Feature | Relational Model | Object-Relational Model |
|---|---|---|
| Data types | Atomic (primitive) | Complex (user-defined, nested) |
| Inheritance | No | Yes |
| Encapsulation | No | Yes |
| Object Identity | No (uses primary key) | Yes (OID) |
| Feature | Object-Oriented Model | Object-Relational Model |
|---|---|---|
| Based on | OOP languages | Relational model + OO features |
| Data Storage | Objects | Tables with complex types |
| Query Language | OQL (Object Query Language) | SQL with extensions |
| Application Fit | Complex apps (CAD, multimedia) | Moderate complexity (business apps) |
| Standards | ODMG (deprecated) | SQL:1999 and above |
| Point | Object-Oriented | Object-Relational |
|---|---|---|
| Ideal for | Highly complex applications | Medium complexity apps |
| Data model | Pure object model | Hybrid model |
| Querying | OQL (less standardized) | Extended SQL |
| Popularity | Less common | Widely supported by RDBMS |
-- Create a user-defined object type
CREATE TYPE Address AS OBJECT (
street VARCHAR2(50),
city VARCHAR2(30),
zip INT
);
-- Create a table using the object
CREATE TABLE Customers (
id INT PRIMARY KEY,
name VARCHAR2(50),
address Address
);
This allows the use of complex types inside relational tables.
In Advanced DBMS, understanding these advanced data models is essential because they allow databases to handle more complex and real-world applications effectively. While object-oriented models are more suited to applications requiring tight integration with OOP, object-relational models provide a practical balance between traditional relational systems and modern application needs.
Open this section to load past papers