Difference between Entity and Object
A database is a organized collection of logical related data stored in a software named Database Management Systems (DBMS). Before inserting the data into the system, it needs to be in the form of a model for appropriate understanding of the database. Many models were introduced and Entity-Relationship model is one among them. It is a graphical representation of the data which gives the whole view of the data. There are basic building units of this E-R model where entity and object are among them.
An entity is a real time object that is different from others. An entity can defined using its attributes. They are a part of entity. Entities can be represented in pictorial form. Collection of similar entities is an entity set.
Example: A computer, car, place, software
An entity that contains both attributes and actions is its object. It is defined by its life span, name and object identifier. Every object has two components: State and Behavior.
Example: views, indices, sequences
Differences between entity and object are:
|1.||Entity is a real time object that can be distinguised from other objects.||Object is an entity that has all the attributes and the actions required to be taken.|
|2.||An entity contains of attributes.||An object has life span, object identifier.|
|3.||Entity is a uniquely identifiable object.||An object can be identified using its identifier.|
|4.||Every entity has a primary key for identification purposes.||Object is not assigned with a primary key.|
|5.||Entity is a part of relational database.||Object is a part of object oriented database.|
|6.||Entities are represented in rectangular shape using E-R diagram.||Objects aren’t represented graphically.|
|7.||Attributes is a property of entity.||Inheritance, Encapsulation, Polymorphism and Abstraction are part of object.|
|8.||Example: Computer, Software.||Example: Minimum age to vote is 18.|
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.