Hello Helloworld,
An "Entity" in a database context refers to a piece of information.
That information may include a number of "attributes". If you are
representing an entity in a programming language, you might define a
record (Ada) or struct (C) to define the entity and its attributes. A
set of examples from a business purchasing system may include:
- purchase order (number, approved)
- product (code, unit price)
- service (code, unit price)
- vendor (id, description)
Entities are often connected by one or more "Relationships" in a
database. Entity / Relationship modeling was introduced by Peter Chen
in 1976 and has been expanded on by several others for many years.
There is often a sharp distinction between the information and the
software to manipulate it as well.
An "Object" encapsulates both data and the methods (or functions) used
to access or manipulate that data. Some of the differences between an
object and entity include:
- The amount of data in an object may be quite a bit larger or
complex than an entity (e.g., sets, lists, tuples).
- You generally have methods to construct, destroy, assign, and copy
an object.
- You also have methods that manipulate that data - for example, in
the purchasing example above, there may be an "Approve Purchase Order"
method that triggers a number of other changes in the data base.
- You generally have inheritance where common data / methods are
reused.
You can certainly define entities and relationships with objects - so
in one way, an object is a superset of an entity.
For additional information, try
http://www.essentialstrategies.com/publications/modeling/compare.htm
a comparison of ER to OO techniques in databases.
I found a few of Chen's early papers but you may need to check a local
library for copies or subscribe to the ACM to access them on line. For
example:
https://portal.acm.org/poplogin.cfm?dl=ACM&coll=portal&comp_id=COMPONENT030&want_href=citation%2Ecfm%3Fid%3D320440&CFID=11433282&CFTOKEN=51867176
which refers to ACM Transactions on Database Systems, March 1976,
p9-36, "The entity relationship model - towards a unified view of
data".
A "manifesto" on object oriented data bases is at
http://www-2.cs.cmu.edu/People/clamen/OODBMS/Manifesto/htManifesto/Manifesto.html
which describes a set of attributes that are "required" for an OO
database.
Search terms include:
object entity database comparison
define object database
define relational database
This should provide the information you have asked for, but if this is
not clear or you need a particular point expanded, please use a
clarification request to ask for further information.
--Maniac |