Home | Previous Page | Next Page   Basics of Database Design and Implementation > Building a Relational Data Model > Diagramming Data Objects >

Reading E-R Diagrams

You read the diagrams first from left to right and then from right to left. In the case of the name-address relationship in Figure 14, you read the relationships as follows: names can be associated with zero or exactly one address; addresses can be associated with zero, one, or many names.

Figure 14. Reading an Entity-Relationship Diagram
begin figure description - Reading from the left to the right there is a rectangle with the word "name" in it. The right side of the rectangle has three lines converging to a single relationship line (this is a symbol for "many"). To the right of that, the relationship line is broken by a circle (this is the symbol for "optional"). The relationship line then continues to the right until it is interrupted by another circle. To the right of the second circle the relationship line connects to another rectangle. Between the circle and the rectangle a short line crosses the relationship line at a right angle (this is the symbol for "exactly one"). The right rectangle contains the word "address". Across the top part of this diagram a grey arrow goes from the name entity to the address entity (left to right). This arrow has the label: "can have zero or exactly 1". Across the bottom part of the diagram a grey arrow goes from the address entity to the name entity (right to left). This arrow has the label: "can have zero, 1, or many. The important point of the diagram is that when you move across a relationship line from entity A to entity B, it is the symbols near entity B that determine how many of entity B can be associated with entity A. So you have to read in both directions to understand the full relationship. - end figure description
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]