Entity Relationship Diagrams
Purpose
Section titled “Purpose”ERDs provide a visual representation of database structure, showing entities, attributes, and relationships.
Components
Section titled “Components”Entities
Section titled “Entities”- Rectangles represent entities (tables)
- Strong entities exist independently
- Weak entities depend on other entities
Attributes
Section titled “Attributes”- Ovals represent attributes (columns)
- Key attributes are underlined
- Composite attributes contain sub-attributes
- Derived attributes are calculated from other attributes
Relationships
Section titled “Relationships”- Diamonds represent relationships between entities
- Lines connect entities to relationships
Cardinality Notation
Section titled “Cardinality Notation”Crow’s Foot Notation
Section titled “Crow’s Foot Notation”- One: Single line
- Many: Crow’s foot (three lines)
- Optional: Circle on line
- Mandatory: Perpendicular line
Examples
Section titled “Examples”- 1:1 - One-to-one relationship
- 1:M - One-to-many relationship
- M:N - Many-to-many relationship
ERD Development Process
Section titled “ERD Development Process”- Identify Entities: Determine main objects/concepts
- Define Attributes: List properties for each entity
- Identify Relationships: Determine how entities connect
- Set Cardinality: Define relationship constraints
- Add Keys: Identify primary and foreign keys
Best Practices
Section titled “Best Practices”- Use clear, descriptive names
- Maintain consistent notation
- Show all important relationships
- Document business rules
- Validate with stakeholders