Entity Relationship Diagram Tutorial
Last updated
Last updated
Entity Relationship Diagram Tutorial Here are some best practice tips for constructing an ERD:
Purpose and scope: Define the purpose and scope of what you’re analyzing or modeling. Add a description of your Subject Area. Document any assumptions and restrictions then you make. Show the level of detail necessary for your purpose. You might want to draw a conceptual, logical or physical model, depending on the detail needed. (See above for descriptions of those levels.)
Entities: Identify the entities that are involved. Identify all of the entities you will use. An entity is a description of something that your system stores information about. This could be a customer, a manager, an invoice, a schedule, etc. Draw a rectangle (or your system’s choice of shape) for each entity you can think of on your page and labeling them as nouns. Keep them spaced out a bit.
Relationships: Determine how the entities are all related. Look at two entities, are they related? If so draw a solid line connecting the two entities and label them. Some entities may not be related, and that’s fine. In different notation systems, the relationship could be labeled in a diamond, another rectangle or directly on top of the connecting line. How are the entities related? Write a brief description of how they are related. Each of your entities may not have any relationships, some may have multiple relationships. That is okay.
Cardinality: Show whether 1-1, 1-many or many-to-many.
Obligated (or participation): Show whether the relationship is mandatory or optional.
Attributes: Layer in more detail by adding attributes of entities. Attributes are often shown as ovals. Any key attributes of entities should be added.
Analyze and complete the diagram: Execute the tips for effective ER diagrams: a) Make sure the ER diagram supports all the data you need to store. b) Make sure all your entities and relationships and attribute are labeled on your diagram. c) Make sure that each entity only appears once per diagram. Eliminate any redundant entities. d) Examine relationships between entities closely. Are they necessary? Are there any relationships missing? Eliminate any redundant relationships. Don't connect relationships to each other. e) Use colors to highlight important portions of your diagram. f) You can transition relational tables and ER diagrams back and forth, if that helps you achieve your goal. g) If you’re troubleshooting a database problem, watch for holes in relationships or missing entities or attributes