中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

2.7 Database Systems: The Entity Relationship Diagram

We can express the overall logical structure of a database graphically with an E-R diagram.
Its components are:

  • rectangles representing entity sets.
  • ellipses representing attributes.
  • diamonds representing relationship sets.
  • lines linking attributes to entity sets and entity sets to relationship sets.

In the text, lines may be directed (have an arrow on the end) to signify mapping cardinalities for relationship
sets. Figures 2.9 to 2.10 show some examples.
Go back and review mapping cardinalities. They express the number of entities to which an entity can be
associated via a relationship.
The arrow positioning is simple once you get it straight in your mind, so do some examples. Think of the arrow
head as pointing to the entity that \one" refers to.

Figure 2.9:Many-to-one from customer to account

Figure 2.10:One-to-one from customer to account

Database System Structure: