Telephone directory example

The following figure shows the telephone directory example and includes the entities, relationships, and attributes. This diagram includes the relationships that you establish with the matrix. After you study the diagram symbols, compare the E-R diagram in the following figure with the matrix in ids_ddi_171.html#ids_ddi_171__sii-02-30139. Verify for yourself that the relationships are the same in both figures.

A matrix such as ids_ddi_171.html#ids_ddi_171__sii-02-30139 is a useful tool when you first design your model, because when you fill it out, you are forced to think of every possible relationship. However, the same relationships appear in a diagram such as the following figure, and this type of diagram might be easier to read when you review an existing model.
Figure 1: Preliminary entity-relationship diagram of the telephone directory example

There are five entities in the diagram. Each entity is represented by a rectangle. The name of each entity is above its rectangle. The attributes of each entity are inside its rectangle. The names of the five entities are: name, voice, fax, modem, and address. The attributes of the "name" entity are: lname, fname, bdate, anniv, email, child1, child2, and child3. The attributes of the "address" entity are: street, city, state, and zipcode. The attributes of the "voice" entity are: vce_num and vce_type. The attributes of the "fax" entity are: fax_num, oper_num, and oper_till. The attributes of the "modem" entity are: mdm_num, b9600, b14400, and b28800. The "name" entity is connected to each of the other four entities by relationships. None of the other four entities are connected to each other. The relationship between "name" and "voice" has no special symbols on the end near "name". The end near "voice" has the symbol for "optional" and the symbol for "many". The relationship between "name" and "fax" has the symbol for "many" on the end near "name". The end near "fax" has the symbols for "optional" and "many". The relationship between "name" and "modem" has the symbol for "exactly one" on the end near "name". The end near "modem" has the symbols for "optional" and "many". The relationship between "name" and "address" has the symbols for "optional" and "many" on the end near "name". The end near "address" has the symbols for "optional" and "exactly one".