Entity Relationship Modelling

ER Modelling is another way to describe the relationship between data objects

Entity Sets

Entity Sets describe the type of an entity.

□ Square - Entity name
○ Circle - Simple attribute
⌾ Double Circle - Multi-valued attribute [ie array]
◌ Dotted circle - Derived attribute [uses other attributes]
Composite attributes are drawn like a subtree
Primary Keys are underlined Straight lines connect these different items together

Diamond for relationship

Candidate Keys are the possible attributes that are can uniquely identify one entity from another.
Super Keys are composite candidate keys where a removal of one of the attributes will still uniquely identify it
An entity’s Primary Key is the chosen candidate key

Cardinality
1:1, 1:M, M:M
They can also be represented with lines and arrows (single arrow from the relator to the ‘one’ relationship)

Level of Participation
Partial Participation - 0 or more
Total Participation - 1 or more (Draw with two lines, or a thick line) (There must be at least one relation for the entity that has been double lined)

Weak and Strong entities

Strong - single border
Weak - double border

Weak Entities only exist because of an association with strong entities.
They therefore have no key, and must be a total commitment (thick/double line).

Relations

Relations can have attributes too!

Subclasss and Inheritances

1
2
3
4
5
6
          parent
            |
      overlapping (o)
        disjoint (d)
      /             \
   Subclass 1      Subclass 2

Entity Instances

Most similar to object instances, entity instances are actualisations of a entity set.

No two entity instances can share the exact same attribute values. (Whereas object instances can)






Box-Line Diagram

Box-line diagrams are another way to represent the relationship between tables.

They are a tabular form of the ER diagram