Today, we will be learning how to make an Entity Relationship Diagram using Chen's Notation. This article will guide you on how to design and create the right ERD for your CS Thesis and Capstone Project.
What is an Entity Relationship Diagram?
An Entity Relationship Diagram or ERD is a diagram that illustrates the logical relationship of each entities set within the database.Entity Relationship Diagram Components and Symbols
An Entity Relationship Diagram has four components namely Entity, Attribute, Relationship, and Cardinality.
Entity. Rectangle is the shape used to represent Entity. In Database view, this is the Table. Entity has three classifications to wit, Strong Entity, Weak Entity, and Associative Entity.
- Strong Entity. If an Entity is required, then it is said to be a Strong Entity.
- Weak Entity. If an Entity is not required, then it is said to be a Weak Entity.
- Associative Entity. If an Entity is just a bridge table (bridge table is used to create many-to-many relationship), then it is said to be an Associative Entity.
Attribute. Oval is the shape used to represent Attributes or Properties. In Database view, this is the column fields. Attribute is classified as Normal, Key or Primary Key, Discriminator or Foreign Key, Multi-valued, and Derived.
- Key Attribute is the Primary Key of a Database Table.
- Discriminator Attribute is the Foreign Key of a Database Table.
- Multi-Valued Attribute is a field in a Database Table that can contain multiple values.
- Derived Attribute is an attribute that does not really exist within the Table.
Example: SELECT sum(price) as total_price FROM products
total_price is a derived attribute.
Relationship. Diamond is the shape used to represent Relationship. Relationship can be classified as Strong or Weak.
- Strong Relationship. If both Entities are required, then the Relationship is said to be Strong.
- Weak Relationship. If one Entity is required and the other one is not, then the Relationship is said to be Weak.
Cardinality. Arrow Line is the shape used to represent Cardinality. The symbol 1-1 is used for One-to-One Relationship, 1-N is used for One-to-Many Relationship, and N-M is used for Many-to-Many Relationship.
- One-to-One. One Customer can only place One Order per Transaction
- One-to-Many. One Order can have Many Product Items
- Many-to-Many. Many Products can be supplied by Many Supplier
Example of Entity Relationship Diagram
Software to Make an Entity Relationship Diagram
The following software tools are very useful if you want to create an Entity Relationship Diagram:
- Microsoft Visio
- Visual Paradigm
- Microsoft Word or Powerpoint
- Dia
No comments:
Post a Comment