Entity Relationship Diagram (ERD)

Context: FIT2094_MOC · the graphical tool for conceptual modelling · Chen vs Crow’s Foot notation · entities, attributes, relationships

Quick Revision

  • 🎯 Objective: graphical conceptual data model (Chen 1976) ➔ entities + attributes + relationships.
  • 📦 Core Components: Chen (rectangles/ovals/diamonds) vs Crow’s Foot (three-partition boxes + cardinality lines).
  • ⚡ Key Constraint: Crow’s Foot can’t attach attributes to a relationship → forces an Associative Entity.

📝 Core

1. The Diagram

2. Two Notations

  • Chen ➔ entities = rectangles, attributes = ovals, relationships = diamonds (can carry attributes).
  • Crow’s Foot (unit standard) ➔ entities = three-partition boxes (name/attributes/key label); relationships = lines with cardinality at both ends.
  • Limitation ➔ Crow’s Foot can’t attach attributes to a relationship.

3. Connection Rule

  • Only relationships ➔ entities link only through relationships, never by sharing attributes.
  • Exception ➔ a weak/child entity may include a parent’s key as part of its identifier (Identifying vs Non-Identifying Relationship).

⚙️ Core Implementation

🔹 Crow’s Foot ERD

⚖️ Core Decision Matrix

AspectChenCrow’s Foot
entityrectanglethree-partition box
attributeovallisted in box
relationshipdiamondlabelled line
attributes on relationshipyesno → Associative Entity

When It Flips: Chen is expressive but bulky; Crow's Foot is compact and implementation-friendly but pushes relationship-attributes into an Associative Entity. The ERD lets stakeholders agree on structure before implementation.

📊 Exam Execution Trace

Manual Execution Trace

Notation mapping:

Step / StateElementChenCrow’s Foot
0 (Init)
1entityrectanglebox
2attributeovalin box
3M:N w/ attributesdiamond + attrsassociative entity

Applied Exercise

Problem: An M:N ORDER–PRODUCT must store op_qtyordered. How does Crow’s Foot handle it? Derivation Proof / Hand-Calculation Walkthrough:

Final Extracted Output: an Associative Entity holds op_qtyordered, resolving the M:N.

🧠 Active Recall