What is Object Oriented Model in DBMS?

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

We have often come across the term 'Object-Oriented Programming' while learning C++, Java, or Python language. The foundation of any object-oriented programming language is based on the concept of objects and classes. This enables the user to achieve abstraction, inheritance, polymorphism, and encapsulation. A similar concept is used in the Object Oriented Model in DBMS.

The Object-Oriented Model in DBMS or OODM is the data model where data is stored in the form of objects. This model is used to represent real-world entities. The data and data relationship is stored together in a single entity known as an object in the Object Oriented Model. The Object-Oriented Database Management System is built on top of Object Oriented Model.

As we have discussed earlier, we can use the Object Oriented Model in DBMS to store real-world entities. Here, we can store pictures, audio, video, and other types of data, which was previously impossible to store with the relational approach (Even though we can store video and audio in the relational database, it is generally not recommended).

Example

Now let us consider an example given below.

Here Transport

  • Here Transport, Bus, Ship, and Plane are objects.
  • Bus has Road Transport as the attribute.
  • Ship has Water Transport as the attribute.
  • Plane has Air Transport as the attribute.
  • The Transport object` is the base object and the Bus, Ship, and Plane objects derive from it.

Take a look at another example- What is Object Oriented Model in DBMS?

As you can see, here Student and Department are two different objects. Each one of them has its attributes and methods. They are linked by a common attribute Dept_no which establishes a relationship between objects.

Components of Object-Oriented Data Model

Components of the Object-Oriented Data Model namely objects, classes, object attributes, class hierarchy, etc., are explained as follows- Object- It is a physical or a real-world entity. The object can also be called the ER model entity. A single instance of an entity is defined by the object. It is known as an 'instance of a class.

Object attribute- The objects have certain characteristics. These are known as the attributes of the object.

Object method- The object's behavior is shown using object methods.

Class- It is a collection of similar kinds of objects. It is an entity that has attributes and methods together.

Inheritance- It is the ability of the object within the class hierarchy to inherit the attributes and methods of the classes above it. A new class can be derived from an existing class, the new class has the attributes and methods described in the existing class and also has its attributes and methods. This helps in code reusability.

Advantages of Object-Oriented Data Model

  • It is used to add semantic content that can be well understood by the user.
  • It is used to make the code resemble real-world objects.
  • Database integrity can be achieved.
  • Structural and database independence is created.
  • We can store pictures, audio, video, and other types of data, which was previously impossible to store earlier.

Disadvantages of Object-Oriented Data Model

  • It has complex navigational data access.
  • There is a steep learning curve here.
  • The transactions might be slow here.

Conclusion

  • The Object Oriented Model in DBMS or OODM is the data model where data is stored in the form of objects. This model is used to represent real-world entities.
  • We can store pictures, audio, video, and other types of data, which were previously impossible to store earlier.
  • The components of the Object Oriented Data Model are classes, objects, attributes, methods, and inheritance.
  • Object-Oriented Data Model can help in database integrity, Structural and database independence and o make the code resemble real-world objects.
  • Also, it can cause complex navigational data access, slow transactions and there is a steep learning curve.

Read More: