Entity-Relationship Diagram

 

 

Definitions

 

 

Entity
An entity is a person, place, thing, concept, or event about which it isnecessary to keep data. It is represented by a rectangle; the entity name iswritten in capital letters.

 

 

Relationship
A relationship is a named business association between two entities. Therelationship is represented as a line between entities; its name is written inlower-case letters. Names are written in both directions - aboveand below the relationship line.

 

 

 

Entity-Relationship Diagram (E/R or ERD)
An Entity-Relationship Diagram is a means of showing a "point-in-time"snapshot of how data is organized. An ERD is not a flow diagram. AnERD may show all or part of an enterprise's data.

 

 

Reading the diagram

 

 

Start at either entity and read the relationship clockwise like a sentence. For example, in this E/R Diagram, read "CUSTOMER places ORDER" and "ORDER is placed by CUSTOMER."

 

 

Cardinalities

 

 

The marks on either end of the relationship line tell the cardinalities of the entities: how many occurrences of the entities participate in the relationship.

 

 

For each entity in a relationship, these are the possible cardinalities:

 

 

 

There must be one and only one occurrence of the entity.

 

 

There can be zero or one occurrence of the entity. In other words, therelationship may not always be created between the entities.

 

 

There can be zero or more occurrences of the entity. Again, therelationship may not always exist.

 

 

There can be one or more occurrences of the entity.

 

 

This relationship would be interpreted as "A CUSTOMER placeszero or more ORDERS" and "An ORDER is placed by only oneCUSTOMER."

 

 

Interpreting this: A person or company does not have to place an order to be considered a customer. Data about the customer is recorded even if it does not place an order (it might be a "prospect").

Last update