Introduction to Object-Oriented Data Model

Object oriented databases or object databases incorporate the object data model to define data structures on which database operations such as CRUD can be performed. They store objects rather than data such as integers and strings. The relationship between various data is implicit to the object and manifests as object attributes and methods. Object database management systems extend the object programming language with transparently persistent data, concurrency control, data recovery, associative queries, and other database capabilities.

Why Object Oriented Databases?

There are three reasons for need of OODBMS:

1. Limitation of RDBMS

These limitations are in relational model. Due to this these limitations are reflected to all RDBMS. These limitations are:

1. Poor representation of real world entities: The Relational model cannot represent real world in proper way because it has only one semantic that is table which can represent the real world entity in proper way.

2. Normalization is necessary, but sometimes not useful: Normalization in RDBMS to maintain the consistency of the database, but some broken relations is not related to real world.

3. Overloading of semantic structure: Relational Data Model has only one semantic structure for representing data and relationship that is table. to this, sometimes it becomes very difficult to find out that which is going to model data or relationship?

4. Poor support for integrity and enterprise constraints: Constraints are very much needed for your database have to be desired data. RDM supports only limited number of constraints. The enterprise constraints are those which are defined by industry standards.

5. Homogeneous data structure: RDM requires homogeneous data structures like:

  • RDM assumes both horizontal and vertical homogeneity.
  • Relational mathematics algebra has only fixed number of operations due to which Relational Model operations cannot be extended.

6.) Tables can store only atomic/single value: No doubt, this is property of RDM. But sometimes in many situations this property becomes its limitation.

7.) Normalization is strongly recommended: Most of the situations, you have must normalize the relation make the data consistency inside your database.

8.) Difficulty in handling recursive queries:

  • There is very poor support to handle recursive queries in RDBMS. For this you must know:
  • Depth of recursive query must be known.
  • You can use the transitive closure operations to handle recursive queries in RDBMS.

9.) Impedance mismatch: SQL Data Manipulation Language (DML) is lack computational completeness. To overcome this situation, you must embed the SQL with any high programming language like C++, Java, and C #. Due to there will be impedance mismatch between two language SQL and higher programming language.

Poor support for long duration transactions: In RDBMS, generally transactions are short lived and concurrency control techniques or mechanisms are not good for .long duration transactions. 11. Poor Schema Evolution support: Schema Evolution means making changes to schema of database at runtime without interrupt the execution of the application.

Poor Navigational Access: There is very poor support for the navigational access in RDBMS. There are some advanced applications need the database with deeper structural and functional foundation of capabilities that are not provided by conventional database.

B. Need for Advanced Applications

a) Computer Aided Design (CAD):

  • In these types of applications, relevant data about buildings, airplanes and integrated circuit chips is stored and managed. In this type of applications, database design may be very large. Design in these types of applications is not static.
  • This design is evolves through the times. Updates need to be propagated.
  • These applications require version control and configuration management.
  • These applications require complex objects for their development. For example, a car’s component may be related to other components.
  • Need long duration transactions because sometimes updates are for reaching.
  • Support for cooperative engineering because most of the times many people work on same design.

b) Computer Aided manufacturing (CAM):

  • These application data is very much similar to CAD, but needs discrete production.
  • These applications must respond to real time events.
  • Generally algorithms and custom rules are used to respond to a particular situation.

c) Computer Aided Software Engineering (CASE):

  •  These applications manage data about the phases of software development life cycle.
  • Design may be extremely large.
  • Involves cooperative work.
  • Need to maintain dependencies among components.
  • Versioning and configuration management.

d) Network Management Systems:

  • Coordinates communication services across the network.
  • These systems are used for such tasks as network path management, problem management and network planning.

e) Other Applications: The Object Oriented Database also used in Office Information Systems, Multimedia systems, Digital Publishing and Geographic information Systems.

C. Popularity of Object Oriented Paradigm

Another domain that enforces the development of OODBMS is popularity of object oriented programming paradigm because a real life situation can be model in best way by using object oriented programming. OO Programming Aspects:

1. Abstraction: It is process of finding important aspects of an entity and ignoring unimportant aspects such as implementation details. The properties comprise two things state and behaviour.  A state is models through the attributes of object and behaviour is models through operations executed on data by object.

2. Object: An object is something uniquely identifiable, models a real world entity and has got state and behaviour. The only big difference between entity and object is that entity has only state has no behaviour, but object contains both state and behaviour. Example: Student

3. Encapsulation: An object contains both current state (Attributes) and set of methods used to manipulate it. It is called encapsulation. Information Hiding: It is process of separates external properties of an object from its internal properties, which are hidden from external environment. These two concepts also related with abstraction. Importance: These two concepts support the facility that internal properties of an object to be changed without affecting applications that use it, provided external properties remain same. It also provides data independence.

4. Attributes: These represent the current state of an object. They can be two types: • Simple Attribute • Complex Attribute 5. Object Identity (OID): It is the unique identifier associated with every object in the system. It has following characteristics: • It is generated by system. • It is unique to that object in the entire system. • It is used only by the system, not by the user. • It is independent the state of the object.

6. Methods and Messages: These implement the behaviour of an object and involve encapsulation. Message: It is a request or call to an object to execute the method that is defined by message.

7. Class: It is Container/Template/Blue-print for objects. Objects inside a class called instances. It comprises many definitions in many different situations. For example: A Class behaves like an object with its own class data and operations.

8. Inheritance: It is the special type of relationship between classes: The inheriting class inherits the some or all properties of the base class depend which mode of inheritance is used. Special classes or inheriting classes are called subclasses and general classes are called super classes. Generalization: It is method to create a superclass is called generalization. Specialization: It is process of forming a sub class is called specialization.

9. Polymorphism: It means “many forms”. It is dynamic feature which executes at run time of program. It involves the concept of overriding and overloading.

10. Complex Objects: An object is called complex object if it contains many sub objects and it is viewed as single object.

11. Relationships: It is basically an association between two things. These are represented through reference attributes, typically implemented through OID’s. Types of binary relationships are:

  • One to One relationship
  • One to Many relationship
  • Many to One relationship
  • Many to Many relationship

Components of Object Oriented Data Model 


A conceptual entity is anything that exists and can be distinctly identified. E.g. a person, an employee, a car, a part. In an OO system, all conceptual entities are modeled as objects. An object has structural properties defined by a finite set of attributes and behavioural properties defined by a finite set of methods. Each object is associated with a logical non-reusable and unique object identifier (OID). The OID of an object is independent of the values of its attributes. All objects with the same set of attributes and methods are grouped into a class, and form instances of that class.

Classes are classified as lexical classes and non-lexical classes.  A lexical class contains objects that can be directly represented by their values. E.g. integer, string. A non-lexical class contains objects, each of which is represented by a set of attributes and methods. Instances of a non-lexical class are referred to by their OIDs. E.g. PERSON, EMPLOYEE, PART are non-lexical classes.

In some OO systems, a class is treated as an object also, and therefore processes its own attributes and methods. These properties are called class attributes and class methods. (Similar to static fields or class variables in Java)

E.g. A class EMPLOYEE can have class attributes called NO_of_EMPLOYEES which holds a count of the number of employee instances in the class, and NEXT_ENO which holds the employee number of the next new employee. The class EMPLOYEE can have a class method called NEW which is used to construct new instances of the class.

2. Attributes

The domain of an attribute of a non-lexical class A can be one of the following:

  • Case (a) a lexical class such as integer, string. An attribute with this domain is called a data-valued attribute.
  • Case (b) a non-lexical class B. An attribute with this domain is called an entity-valued attribute.

Note the recursive nature of this definition. There is an implicit binary relationship between attributes A and B. The value of the attribute A is the OID of an instance of B, which must exist before it can be assigned to the attribute. This provides referential integrity.  A special case exists in which the class B is in fact A. This represents a cyclic definition in the OO model.

3. Method

Method represents the behavior of an object. Basically, it represents the real-world action. For example: Finding a STUDENT marks in above figure as Setmarks().

4. Inheritance

By using inheritance, new class can inherit the attributes and methods of the old class i.e. base class. For example: as classes Student, Doctor and Engineer are inherited from the base class Person.

Advantages of Object Oriented Data Model 

  • Codes can ne reused due to inheritance.
  • Easily understandable.
  • Cost of maintenance can reduced due to reusability of attributes and functions because of inheritance.
  • Support for User Defined data types: OODBs provides the facilities of defining new user defined data types and to maintain them [9].
  • OODB’s allow creating new type of relationships: OODBs allow creating a new type of relationship between objects is called inverse relationship (a binary relationship)
  • No need of keys for identification: Unlike, relational model, object data model uses object identity (OID) to identify object in the system
  •  Development of Equality predicates: In OODBs, four types equality predicates Identity equality, Value equality of objects, Value equality of properties , Identity equality of properties
  • No need of joins for OODBMS’s: OODBs has ability to reduce the need of joins
  • Performance gains over RDBMS: Performance gains changes application to application. Applications that make the use of object identity concept having performance gains over RDBMS’s
  • Provide Facility for versioning management: The control mechanisms are missing in most of the RDBMS’s, but it is supported by the OODBMS’s
  • Support for nested and long Duration transactions: Most of the RDBMS’s do not support for long and nested transactions, but OODBMS’s support for nested and long duration transactions
  • Development of object algebra: Relational algebra is based on relational mathematics and fully implemented, but object algebra has not been defined in proper way. Five fundamental object preserving operators are: union, difference, select, generate and map

Disadvantages of Object Oriented Data Model 

  • It is not properly developed so not accepted by users easily.
  • Coherency between Relational and Object Model: Relational databases are founded in every organization. To overcome relational databases, object databases have to be providing coherent services to users to migrate from relational database to object database. Architecture of Relational model and Object model must be provide some coherency between them
  • Optimization of Query Expression: Query expression optimization is done to increase the performance of the system .Optimization of queries is very important for performance gains. But due to following reasons it is difficult to optimize queries in object databases:
           • User defined data types
           • Changing variety of types
           • Complex objects, methods and encapsulation
           • Object Query language has nested structure
           • Object Identity
  • No fixed query algebra for OODBMS’s: Due to lack of the standards in OODBMS, there is no standard query algebra for OODB. Lack of standard query algebra becomes one of the reasons for problem of query optimization. There are different query languages for different object databases.
  • No full-fledged query system: Query system also not fully implemented. Some query facilities lacks in Object databases like nested sub-queries, set queries and aggregation function
  • No facility for Views: In relational databases, views are temporary tables. Object databases having no facility for views. An object oriented view capability is difficult to implement due to the features of Object Model such as object identity. Object oriented programming concepts like inheritance and encapsulation makes the difficult to implement views in object databases
  • Security problems in Object databases: Security is related to authentication, authorization and accounting. Discretionary Access Control (DAC), Mandatory Access Control (MAC) security policies are implemented in object databases to secure data. In some systems provide security on the basis of object oriented concepts like encapsulation. Object database having to facilities for authorization