Database relationships
Relationships between database
Entities can be linked between databases, this is called a relationship.
Types of relationships
- One-to-one Examples of such a relationship include the relatIonship between Husband and Wife, Country and Prime Minister.
- One-to-many Examples include the relationship between Father and Child, Costumer and Order.
- Many-to-many Examples include the relationship between Student and Course, Stock Item and Supplier, Film and Actor.
Relationship modelling
Relationships can be modelled using an entity relationship diagram.
Relational databases
There are a few concepts with a relational database.
Foreign key
A foreign key is a attribute that has been linked to an external table. The foreign key is the primary key an another database.