|
An entity-relationship diagram is a graphical depiction of organizational system elements and the association among the elements. E-R diagrams can help define system boundaries. The elements that make up a system are referred to as entities. A relationship is the association that describes the interaction between entities. An E-R diagram may also indicate the cardinality of a relationship. Cardinality is the number of instances of one entity that can, or must, be associated with each instance of another entity. In general we may speak of one-to-one, one-to-many, or many-to-many relationships. There are several different styles used to draw Entity-Relationship diagrams. The Kendall and Kendall text uses the Crow's Foot notation. Using this notation entities are represented by rectanges and relationships are indicated by lines connecting the rectangles. Cardinality is shown by a series of "tick marks" and "crows feet" superimposed on the relationship lines.
In the following example each student fills one seat in a class. Each seat is filled by one student. (In this usage a "seat" implies not only a physical place to sit but also a specific day and time.) This is a one-to-one relationship.
In the next example a single instructor may teach several courses. Each course has only one instructor. This is a one-to-many relationship.
As shown below, a single student may register for several courses. A single course can have many students enrolled in it. This is the many-to-many relationship.
The next example shows a relationship in which it is possible that no instances exist. Each professor may teach several course sections but may not teach at all if on sabbatical. Assume there is no team teaching, therefore each section must have a single professor.
Finally, a more complex example which shows more than one relationship. All of the examples above depict single relationships. An actual E-R diagram would show the many entities and relationships that exist within a system. Here each department offers at least one course; there is no cross-listing of courses with other departments. Each course must have at least one section but often has several sections.
The E-R notation used in the Kendall and Kendall text (4th through 6th editions) also allows for distinguishing different types of entities. A plain rectangle is used for what is termed a fundamental entity, that is, an entity that is a real thing (person, place, or thing). The term associative entity is used for something that is created that joins two entities (for example, a receipt that exists when a customer and a salesperson complete a transaction). And, the term attributive entity is used for data that is dependent upon a fundamental entity and is useful for describing attributes (for example, to identify a specific copy of a movie title when a video store has multiple copies of each movie).
|