Chen ER Diagram - Entity-Relationship Diagram in Chen Notation
What is Chen ER Diagram?
Chen ER diagram is an entity-relationship diagram notation that shows entities, attributes, and relationships within a data model. It is a useful method for designing conceptual models. Unlike the other entity-relationship diagram notations, it depicts the entity attributes and relationships in separate boxes, connected to the entities.
The Chen notation was created by Peter Chen, a computer scientist who specialized in database theory. He is most notable for his work on the entity-relationship model, which he first published in 1976. The Chen ER diagram is one of the most popular notations for conceptual and logical ER models.
The diagram notation is used in software engineering and database design.
Chen Diagram Symbols
Chen ER diagram offers these symbols:
Entity
An entity represents a set of objects with the same attributes within a data model. An entity represents a real-world object or concept, such as a person, place, concept, or thing. It is depicted as a rectangle with the entity name written inside.
Each entity must have a unique identifier, known as a primary key, which allows it to be distinguished from other entities. In a Chen ER diagram, the primary key is represented by key attributes (the attributes with an underline beneath the name).
Entities may also have additional attributes, which are used to describe its properties. For example, a customer entity might have attributes such as name, address, and phone number. Attributes are represented by an oval shape, with the attribute name written inside.
Weak Entity
A weak entity is a type of entity that does not have any unique key for the attribute tuples. A weak entity depends on another entity (called also the identifying entity) that is considered its owner. A weak entity is an entity that cannot exist without an entity it depends on. It is depicted as a rectangle with a double border. The entity is connected with an identifying relationship to the identifying entity.
An example of a weak entity may be a Payment to which a Customer is a strong entity. A Payment stores additional information about each payment made by a Customer, such as the payment amount, date, and method.
Associative Entity
An associative entity represents a many-to-many relationship that is expressed by another entity (or a table in a database). An associative entity is a specific type of a weak entity. It is depicted as a rectangle with a diamond inside.
Associative entities are used when there is a need to store data about associations between two entities. For example, if we have a department and its employees, the employee may have an "employee classification" that indicates which department he or she works for.
Attribute
An attribute contains a piece of information that describes an entity. It provides more detail about the entity and expresses its characteristics. An attribute is depicted as an ellipse. There are these types of attributes:
- Standard attribute
- Key attribute
- Weak key attribute
- Multi-value attribute
- Derived attribute
Key Attribute
A key attribute represents an identifying attribute. The key attributes define a combination of keys that unambiguously define a tuple within an entity. It serves as the primary key for the entity, and is used to establish relationships between entities.
A key attribute is represented by an oval with underlined name.
Weak Key Attribute
A weak key attribute (or partial key) is an attribute that in combination with the owner's key creates a key for a weak entity. A weak key attribute can be used to identify instances of an entity, but is not sufficient to uniquely identify each instance. This means that two or more instances of the same entity can have the same value for a weak key attribute.
A weak key attribute is represented by an oval with dashed underlining of the name.
Multi-Value Attribute
A multi-value attribute can have multiple distinctive values for a single instance of an entity. The attribute is represented by an array of values. It is represented by a double oval with the attribute name inside. For example, a person entity may have multiple phone numbers.
Derived Attribute
A derived attribute represents an attribute that does not physically exist in permanently stored form. It is an attribute that is calculated from other attributes. A derived attribute is represented in the diagram as an oval with a dashed line border.
For example, a person's age could be a derived attribute based on their date of birth.
Relationship
A relationship defines the interconnection between two entities. It is depicted as a diamond. The entities are connected to the relationship through lines called participations. There are two specific types of relationships:
- Strong relationship - is depicted as a diamond with a normal line border.
- Weak relationship (Identifying) - is depicted as a diamond with a double line border.
Strong Relationship
A strong relationship, represented by a diamond shape with a solid border, connects two entities in a diagram and signifies the mutual existential independence of the two entities. Entity A can exist without Entity B, and vice versa, in this type of relationship.
Weak Relationship
A weak relationship, also known as an identifying relationship, is represented by a diamond shape with a double border. This type of relationship represents an association between two entities, where the existence of the weak entity is dependent on the existence of the related entity. This relationship is often used to model a many-to-one relationship between entities, such as a user and their emails.
Participation
The Chen ER diagram allows you to define a type of entity participating in a relationship. It can be:
- Total participation - is depicted as a double line
- Partial participation - is depicted as a solid line
- Optional participation - is depicted as a dashed line
Cardinality
The relationship can connect one or multiple tuples from one entity to one or multiple tuples of another entity. You can use these cardinalities for the relationships:
- One-to-one (1:1)
- One-to-many (1:N)
- Many-to-one (N:1)
- Many-to-many (M:N)
How to Make Chen ER Diagram
1. Press CTRL+D or click on the Plus button in the tab bar above the diagram editor and select the Chen Entity-Relationship Diagram. You can also press CTRL+SHIFT+D and choose the diagram in the dialog. The dialog allows you to specify the diagram name and add the diagram to the project in one step.
2. Add entities, attributes, and relationships using the toolbox. You can drag & drop the elements to the diagram or select the element in the toolbox and then specify the bounds of the element in the diagram (press and hold the mouse button in the top left corner of the bounds, move to the right bottom corner and release the button).
3. You can adjust the positions of existing entities, attributes, and relationships using the Selection tool. Select the element you want to move and drag it to the desired position.
You can also change the type of entity, attribute, relationship, and participation without its re-creation.
Just select the desired element in the diagram editor and right-click on it. You can change the new type from the context menu:
- for Entity, you can choose between Standard and Weak.
- for Attribute, you can choose between Key, Weak Key, Derived, Multi Value, and Standard.
- for Relationship, you can choose between Standard, Weak and Associative Entity.
- for Participation, you can choose between Standard, Optional and Total.
Alternatively, you can change the type of the selected Chen ERD element using the ribbon - switch to the Model context tab and choose the desired element subtype using the respective button in the Modifiers group.
4. You should set the correct cardinalities for particular participations. Select a participation connector that leads from an entity to a relationship. Then click on the highlighted label and choose from the offered cardinalities or enter the custom one.
5. Export the Chen ER diagram to an image format to use it outside Software Ideas Modeler. Click on the Diagram tab in the top ribbon and then click on the Export button (located in the Process group). Choose Image from the displayed drop-down menu and specify the format, size, and exported content in the follow-up dialog.
You can find the text version of this video tutorial on how to create a Chen Entity-Relationship Diagram here.
Chen Diagram Examples
You can check out our examples of Chen ER diagrams:
New Comment