1:1, 1:N and M:N

A relationship is an association between records. Frequently, the records are located in two different tables (i.e., binary), but they can be in a single table (i.e., unary) or in more than two tables (i.e., n-ary). One side of the relationship is generally referred to as the parent-side and the other as the child-side. The X:Y notation (pronounced X-to-Y) means that X parents are related to Y children. Here are some examples:

The relationship between women and their biological children is 1:N (pronounced One-to-N or One-to-Many). Each female may have any number of children (including zero). Each child, however, may have at most one mother. Not surprisingly, it is this example that led to the term parent-child relationship in database modeling.

The relationship between stepmothers and children is M:N (pronounced M-to-N or Many-to-Many). Females can have lots of stepkids (including zero) and kids can have lots of stepmoms (including zero).

The spousal relationship between men and women is 1:1. Each man may currently be married to at most one woman. Each woman may currently be married to at most one man.

The ex-spousal relationship between men and women is M:N. There is no limit on how many mistakes a person can make.

The relationship between students and courses is M:N. Each student can take lots of different courses and each course can have lots of different students.

The relationship between colleges and departments is 1:N. Each college at UT can have lots of departments, but each department must belong to a single college. For instance, Accounting is one of the five departments belonging to the McCombs college.

The relationship between employees and projects is M:N. Each employee can work on lots of different projects and each project can have lots of different employees working on it.

The relationship between employees and paychecks is 1:N. Each employee can receive lots of paychecks over time, but every paycheck must be made out to exactly one employee.

More FAQs