The Entity Relationship Diagram (ERD) depicts a conceptual data model that incorporates some of the important scientific information about the real world. It adopts a natural view that the real world consists of entities and relations (Chen, 1976).
One objective of the ERD is to create a simple, easy to understand and conveniently presented data model consisting of entities, attributes, relationships and cardinalities. The model serves as tool for database design, where the model can facilitate communication between the system analyst or designer and the end-user during the requirement analysis and conceptual design phases.
Chen published one of the first articles on the entity-relationship model in 1976 at a database conference (Chen, 1976).
The concept of entity-relationship already existed for years in the field of philosophy and began to be applied to database design heavily between 1975 and 1980. In 1979, there was a conference on the entity-relationship model during the First International Conference on Entity-Relationship Approach in Los Angeles, California. Annual conferences on the topic continued until 1995, when the conference was renamed the International Conference on Conceptual Modeling (AICCM, 2003).
The entity-relationship model is the result of the unification of the hierarchical, network and relational models for developing a logical database design. One important purpose of the entity-relationship model was to have a database model that was independent of the existing database management systems.
An entity is defined as a person, place or thing in the real world or is conceptual, only existing in someone’s mind. An entity that is specific is similar to an object instantiation of a class. Entity types are a more powerful and concise representation of entities. An entity type is a collection of entities that share a common definition. For example, an entity may be a Ford car, whereas an entity type could be a manufacturer. An attribute is any aspect, feature, quality or characteristic of an entity. An attribute must be capable of being defined in terms of words or numbers. An attribute may be the name of a relationship or entity, it may describe what the entity looks like, how old it is or where it is located. An attribute may also describe why a relationship exists, how long it will last, how long it has existed or under what condition it exists. A relationship is any association, linkage or connection between entities. The entity, attribute and relationship are the key concepts represented in an ERD.
An ERD is a high-level conceptual data schema. It illustrates the description of the entities and relationships of the system to be built. It is usually used in conjunction with a data flow diagram and state transition diagram in structured analysis (Pressman, 2001).
Since a database is primarily concerned with the data and its relations, the ERD plays a major role in the design process of database systems (Elmasri, R., Navathe, S. B., 1994a).
The Object Modeling Technique (OMT) is closely related to the ERD technique. OMT can be seen as an extended version of the ERD technique where OMT focuses on objects and also defines operations on objects in addition to attributes (Rumbaugh et al, 1991).
The notation used in an ERD is standardized and fairly simple. The entity types are shown in rectangular boxes. The relationship types are depicted by a diamond-shaped box and attached to the participating entities. A component’s attribute is illustrated with an oval. The symbols used in an ERD are listed in Table 1 along with their corresponding description and definition (SD, 2003).
Figure 1 is an illustration of a simple ERD depicting a relationship
SymbolDescription and Definition
Entity
An entity is an object or concept about which you want to store information.
Weak Entity
A weak entity is dependent on another entity to exist.
Attributes
Attributes are the properties or characteristics of an entity.
Key attribute
A key attribute is the unique, distinguishing characteristic of the entity. For example, an employee’s social security number might be the employee’s key attribute.
Multivalued attribute
A multivalued attribute can have more than one value. For example, an employee entity can have multiple skill values.
Derived attribute
A derived attribute is based on another attribute. For example, an employee’s monthly salary is based on the employee’s annual salary.
Relationships
Relationships illustrate how two entities share information in the database structure.
Weak relationship
To connect a weak entity with others, you should use a weak relationship notation.
Table 1: ERD Symbols
between a manager and an employee. In this diagram, the employee has three attributes: social security number, address and skills. The social security number is the key attribute because it is the number that is used identify the employee in the corporate database in this example. The skills attribute is multi-valued because the employee can have many skills. The manager supervises the employee. This relationship is one-to-many because one manager can supervise
Figure 1: Simple ERD
many employees and each employee has just one manager.
One of the problems with the ERD is that there are several methods of drawing
the cardinality and ordinality of the relationships. Figure 2 shows the cardinality symbol
Figure 2 Styles of drawing cardinality and modality of relationships in the ERD.
methods for four styles: Information Engineering, Chen, Bachman and Martin styles (SD, 2003).
Cardinality specifies how many instances of a relationship relate to one instance of another entity. Ordinality describes the relationship as either mandatory or optional. Therefore, cardinality specifies the maximum number of relationships while ordinality specifies the minimum number of relationships. The drawing styles for cardinality and ordinality are not standardized and this makes it difficult at times to interpret the diagrams if the reader is not familiar with a particular style.
Over the years, the ERD has been extended and even put into an evolutionary format where the diagram can depict changes made to antiquated database systems (Liu, C.T, Chrysanthis, P.K., Chang, S.K., 1994b).
The evolutionary ERD involves yet another set of symbols to illustrate the changes. It is interesting that the ERD is not part of Unified Modeling Language (UML).
In fact, there appears to be a schism between the followers of UML and the Concepts Modeling camp. One of the papers published at last year’s conceptual modeling conference rated the clarity, minimality, expressiveness, simplicity and correctness of an ERD and a corresponding UML class diagram (Si-Said Cherfi, S., Akoka, J., Comyn-Wattiau, I., 2002).
The conclusion was that the diagram quality measurements derived were a breakthrough, but the underlying message was that the ERD diagram always rated higher in quality than the UML diagram. The UML community is probably not interested in adopting the ERD because it is not standardized. Even though it is not part of UML, it is still widely used in the database design community.
References
AICCM (2003).
Anthology of International Conference on Conceptual Modeling. Available http://www.informatik.uni-trier.de/~ley/db/conf/er/. Updated June 6, 2003. Accessed June 9, 2003.
Chen, P. P. (1976).
The Entity Relational Model – Towards a Unified View of Data. ACM Transactions on Database Systems. Vol 1, No 1.
Elmasri, R., Navathe, S. B. (1994a).
Fundamentals of Database Systems. Benjamin-Cummings Publication Company.
Liu, C.T, Chrysanthis, P.K., Chang, S.K. (1994b).
Database Schema Evolution Through the Specification and Maintenance Changes on Entities and Relationships. International Conference on Entity Relationship Approach.
Pressman, R.S. (2001).
Software Engineering A Practitioner’s Approach. McGraw-Hill.
Rumbaugh, J., Blaha, M., Premerlani, W., Eddy, F., Lorenson, W. (1991) Object-Oriented Modeling and Design. Prentice Hall Intl.
SD (2003).
How To Draw Entity Relationship Diagrams. Available http://www.smartdraw.com/
resources/center/software/erd.htm. Updated June 5, 2003. Accessed June 8, 2003.
Si-Said Cherfi, S., Akoka, J., Comyn-Wattiau, I. (2002).
Conceptual Modeling
Quality – From EER to UML Schemas Evaluation. International Conference on Conceptual Modeling.