views:

210

answers:

4

Is entity an instance of class?

+1  A: 

A class is a template for an object (among other things), and is a very general concept.

An entity has more semantic significance and is usually tied to a concept (possibly about a real object for example, an Employee or a Student or a Music Album) and is linked to business logic.

Entities are usually used to establish a mapping between an object and to a table in the database. Entities are also known as domain objects. Like I mentioned before, entities will be used in situations where there is business logic and as such it hold information about the system (or part of the system) that it is modeling.

Vivin Paliath
+1  A: 

An entity usually refers to something, anything really, that has a unique and separate existence.

In software development this word is almost only used to denote that one instance is different from another instance and they are independent of each other.

A class, on the other hand, defines or contains the definition of an object. Once that object is constructed based on the definition, then you get your instance or object instance.

Jon Limjap
+1  A: 

An object is an entity that has state, behavior, and identity. The structure and behavior of similar objects are defined in their common class. The terms instance and object are interchangeable.

From Grady Booch book.

So we could say, that entity, object and class instance are interchangeable.

Sergey Teplyakov
A: 

Here is an introduction to different OOAD classes: http://developergeeks.com/article/40/ooad-identifying-classes-and-their-responsibilities