The entity-relationship model is based on a perception of the world as
consisting of a collection of basic objects (entities) and
relationships among these objects.
An entity is a distinguishable object that exists.
Each entity has associated with it a set of attributes
describing it.
E.g. number and balance for an account entity.
A relationship is an association among several entities.
e.g. A cust_acct relationship associates a customer with
each account he or she has.
The set of all entities or relationships of the same type is called
the entity set or relationship set.
Another essential element of the E-R diagram is the mapping
cardinalities, which express the number of entities to which another
entity can be associated via a relationship set.
We'll see later how well this model works to describe real world situations.
The overall logical structure of a database can be expressed graphically
by an E-R diagram:
rectangles: represent entity sets.
ellipses: represent attributes.
diamonds: represent relationships among entity sets.
lines: link attributes to entity sets and entity sets to
relationships.