Skip to content

Relationship

A relationship in E-R databases is akin to a relation of the mathematical kind. It is a construct that connects two or more entities

Relationship Set

A relationship set is a mathematical relation between b >= 2 entities, each taken from entity sets. It describes a relationship between two or more entity sets

Example

In the Battling Civilisations videogame, the player enters a stage (one of many, with their own designs) with their army. Both the player and foe's armies contain soldiers, who carry different kinds of weapons. While traversing the stage, one must watch out for traps set by the enemy's civilisation. 

After the battle is over, the soldiers come back to spend the night in their tents. Each soldier has his own tent.

The relations in this extract are:

  • Army <- contains -> Soldiers
  • Soldier <- carries -> Weapon
  • Soldier <- rests in -> Tent

Representation of a Relationship

armyarmy_IDsoldiersstrengthsoldiersoldier_IDnameequipped_weaponcontains