DBMS relationships depend on the set-up and use of the DBMS. They can be one-to-one, or one-to-many, as well as many-to-one or many-to-many relationships.
In a table listing employees and the departments they work for, the relationship between employees and department is many-to-one.
For instance, Mr A, Mrs B and Mr C are working on projects P009, P010 and P011. The question 'Who works on project P009?' and 'Which project is Mr C working on?' both have multiple answers. The relationship is therefore many-to-many.
As a rule, a DBMS will use all relationships in varying combinations at some point or another. A user may, for instance wish to find out which employee from which department is working with which employee on which project.
- One-to-One Relationships
- One-to-Many or Many-to-One Relationships
In a table listing employees and the departments they work for, the relationship between employees and department is many-to-one.
- Many-to-Many Relationships
For instance, Mr A, Mrs B and Mr C are working on projects P009, P010 and P011. The question 'Who works on project P009?' and 'Which project is Mr C working on?' both have multiple answers. The relationship is therefore many-to-many.
As a rule, a DBMS will use all relationships in varying combinations at some point or another. A user may, for instance wish to find out which employee from which department is working with which employee on which project.