Object Relational Database
Object Relational Database
Object Relational Mapping (ORM) : It is a technique that lets you to query and manipulate
the data form the database using the object-oriented paradigm. (basically object oriented
database main classes hoti hai , objects hote hai aur relational model mein tables , tuples and
attributes , to dono alag alag hai isliye dono ko interact krwane ke liye hm ORM use krte hai )
For ORM , Object Relational Mapper is used which a software or a framework which enables
mapping of objects to relational tables and interaction between objects and tables. It is code
library that automates the transfer of data stored in relational database tables to objects that
are more commonly used in application code .
Key Concepts in Object-Relational Databases
1. Relational Model Foundation:
o ORDBMSs are built on the principles of relational databases, using tables to
store data with rows and columns, supporting SQL for queries.
o They maintain the ACID properties (Atomicity, Consistency, Isolation,
Durability), ensuring reliability and data integrity in transactions.
2. Object-Oriented Features:
o ORDBMSs extend the relational model by adding features typical of object-
oriented programming, such as inheritance, encapsulation, and
polymorphism, allowing for better modelling of complex data relationships.
o They enable storing more complex data types, such as multimedia files,
geographical data, and even custom data types defined by users.
3. Complex Data Types and Structures:
4. Encapsulation :
o ORDBMSs support defining methods (functions) within the database, which
can operate on complex data types. These methods can be encapsulated
within the data type, improving data handling.
Advantages
1. Support for Complex Data Types: ORDBMSs can store and manage complex data
types (like multimedia, geospatial data) natively, making them ideal for applications
needing to handle varied data.
2. Enhanced Querying Capabilities: SQL extensions allow for more complex queries,
including recursive and hierarchical queries, which are challenging in standard
RDBMSs.
3. Scalability: ORDBMSs maintain the scalability of relational databases while
supporting the advanced functionality of object-oriented databases, making them
suitable for large-scale applications.
4. Flexibility with SQL Compatibility: Extending SQL with object-oriented features
allows easier migration from traditional relational databases.
Disadvantages
1. Increased Complexity: The additional features and data types can complicate
database design and increase management overhead.
2. Performance Overhead: Object-oriented features like inheritance and encapsulation
can reduce performance compared to simpler relational models.
3. Limited Vendor Support: Fewer ORDBMS options are available compared to
traditional RDBMS, which may limit choice and flexibility.
4. Complexity in Query Optimization: Complex data structures and extended SQL can
make query optimization more challenging, potentially leading to slower queries.
5. Higher Cost: ORDBMS solutions are often more costly to implement and maintain,
especially when considering advanced features and specialized staff.