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. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Strong and Weak Entity
- Difference between Entity constraints, Referential constraints and Semantic constraints
- Weak Entity Set in ER diagrams
- Difference between Component and Object
- Difference between Functional Programming and Object Oriented Programming
- Difference between Structured and Object-Oriented Analysis
- Difference between Source Code and Object Code
- Difference between Function Oriented Design and Object Oriented Design
- Differences between Procedural and Object Oriented Programming
- JDBC Using Model Object and Singleton Class
- Difference between Stop and Wait, GoBackN and Selective Repeat
- Difference between Stop and Wait protocol and Sliding Window protocol
- Similarities and Difference between Java and C++
- Difference between Yaacomo and and XAP
- Difference between VoIP and and POTS
- Difference and Similarities between PHP and C
- Difference between Time Tracking and Time and Attendance Software
- Difference Between Single and Double Quotes in Shell Script and Linux
- Object Oriented Programming | Set 1
- Introduction of Object Code in Compiler Design
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.