RelationalDBDesign RelationalDBDesign

ER Diagrams   «Prev 

Illustrate one-to-many Relationship in Relational Database

When you have two entities ask yourself these questions.
  1. How many entities of B can belong to entity A?
  2. How many entities of A can belong to entity B?
Of the answer to question 1 is many and the answer to question 2 is one or possibly none you are dealing with a one-to-many relationship.

one-to-many (1:N) Relationships

A one-to-many (1:N) relationships is when for one instance of entity A, there are zero, one, or many instances of entity B, but for one instance of entity B, there is only one instance of entity A.
An example of a 1:N relationships is
a department has many employees
each employee is assigned to one department

This image illustrates a 1:N relationship between Table A and B from the viewpoint of Table A, showing one record in Table A related to many records in Table B (A:B = 1:N)

This image shows the relationship from the viewpoint of Table B. One record in Table B relates to one record in Table A (B:A = 1:1).