Entity Relationship Diagrams PT1
Entity Relationship Diagrams PT1
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as
people, objects or concepts relate to each other within a system. ER Diagrams are most often
used to design or debug relational databases in the fields of software engineering, business
information systems, education and research. Also known as ERDs or ER Models, they use a
defined set of symbols such as rectangles, diamonds, ovals and connecting lines to depict the
interconnectedness of entities, relationships and their attributes. They mirror grammatical
structure, with entities as nouns and relationships as verbs.
ER diagrams are related to data structure diagrams (DSDs), which focus on the relationships of
elements within entities instead of relationships between entities themselves. ER diagrams also
are often used in conjunction with data flow diagrams (DFDs), which map out the flow of
information for processes or systems.
History of ER models
Peter Chen (a.k.a. Peter Pin-Shan Chen), currently a faculty member at Carnegie-Mellon
University in Pittsburgh, is credited with developing ER modeling for database design in the
1970s. While serving as an assistant professor at MIT’s Sloan School of Management, he
published a seminal paper in 1976 titled “The Entity-Relationship Model: Toward a Unified
View of Data.”
In a broader sense, the depiction of the interconnectedness of things dates back to least ancient
Greece, with the works of Aristotle, Socrates and Plato. It’s seen more recently in the 19th and
20th Century works of philosopher-logicians like Charles Sanders Peirce and Gottlob Frege.
By the 1960s and 1970s, Charles Bachman (above) and A.P.G. Brown were working with close
predecessors of Chen’s approach. Bachman developed a type of Data Structure Diagram, named
after him as the Bachman Diagram. Brown published works on real-world systems
modeling. James Martin added ERD refinements. The work of Chen, Bachman, Brown, Martin
and others also contributed to the development of Unified Modeling Language (UML), widely
used in software design.
Entity
A definable thing—such as a person, object, concept or event—that can have data stored about
it. Think of entities as nouns. Examples: a customer, student, car or product. Typically shown as
a rectangle.
ENTITY
Entity type: A group of definable things, such as students or athletes, whereas the entity would
be the specific student or athlete. Other examples: customers, cars or products.
Entity set: Same as an entity type, but defined at a particular point in time, such as students
enrolled in a class on the first day. Other examples: Customers who purchased last month, cars
currently registered in Florida. A related term is instance, in which the specific person or car
would be an instance of the entity set.
Entity categories: Entities are categorized as strong, weak or associative. A strong entity can be
defined solely by its own attributes, while a weak entity cannot. An associative entity associates
entities (or elements) within an entity set.
Entity keys: Refers to an attribute that uniquely defines an entity in an entity set. Entity keys
can be super, candidate or primary. Super key: A set of attributes (one or more) that together
define an entity in an entity set. Candidate key: A minimal super key, meaning it has the least
possible number of attributes to still be a super key. An entity set may have more than one
candidate key. Primary key: A candidate key chosen by the database designer to uniquely
identify the entity set. Foreign key: Identifies the relationship between entities.
Relationships
How entities act upon each other or are associated with each other. Think of relationships as
verbs. For example, the named student might register for a course. The two entities would be
the student and the course, and the relationship depicted is the act of enrolling, connecting the
two entities in that way. Relationships are typically shown as diamonds or labels directly on the
connecting lines.
Recursive relationship: The same entity participates more than once in the relationship.
Attribute
A property or characteristic of an entity. Often shown as an oval or circle.