Entity-Relationship Diagram![]() |
|
|
|
| Definitions | |
|
|
| 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. |
![]() |
|
|
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. |
![]()
|
|
|
|
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 | |
![]() |
|
|
|
|
|
| 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: |
|
|
|
![]() |
|
|
|
![]() |
|
|
|
![]() |
|
|
|
![]() |
|
|
|
| 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