Object based Data Models

DatabaseMCA

In object based data models, the focus is on how data is represented. The data is divided into multiple entities each of which have some defining characteristics. Moreover, these data entities are connected with each other through some relationships.

So, in object based data models the entities are based on real world models, and how the data is in real life. There is not as much concern over what the data is as compared to how it is visualised and connected.

Some examples of object based data models are

  • Entity Relationship Data Model

  • Object Oriented Data Model

  • Semantic Data Model

  • Functional Data Model

Out of these models, Entity Relationship Data Model and Object Oriented Data Model are the most popular. Therefore details about these two models are as follows −

Entity Relationship Data Model

ER model is used to represent real life scenarios as entities. The properties of these entities are their attributes in the ER diagram and their connections are shown in the form of relationships. 

An ER model is generally considered as a top down approach in data designing.

An example of ER model is −

This is an ER model of a Hospital. The entities are represented in rectangular boxes and are Patient, Tests and Doctor.

Each of these entities have their respective attributes which are −

  • Patients - ID (primary key), name, age,visit_date

  • Tests- Name (primary key), date, result

  • Doctor- ID (primary key), name, specialisation

Object Oriented Data Model

Object oriented data model is also based on using real life scenarios. In this model, the scenarios are represented as objects. The objects with similar functionalities are grouped together and linked to different other objects.

An Example of the Object Oriented data model is − 

  • PERSON and EMPLOYEE are 2 objects in this model. 
  • PERSON has the attributes Name, Address, Age and Phone number.
  • EMPLOYEE has the attributes Employee ID, Employee Type and Department ID

The object EMPLOYEE inherits data from the object PERSON i.e the attributes for PERSON would also be available for EMPLOYEE.

raja
Published on 24-Jul-2018 17:48:03
Advertisements