The way of Barker offers a very useful notation for entities which are embedded into other entities as sub-types into super-types which is the same with the set theory symbolism as well as a subset is included in another set as an element. This approach to subtypes of relationships (entities) is a great advantage as long as it supports the inheritance through hierarchy of several levels deep.
One-to-One Relationships
In this kind of relationship, a key will appear only once in a related table. An example of a one-to-one relationship is if each employee is assigned at one department within a company. The one-to-one relationship of employees to departments in the data model is shown below.
One-to-Many Relationships
In a one-to-many relationship, keys from one table will appear multiple times in a related table. An example is the connection between monthly employees overtime work and the master table of employees of a company. Indeed, more than one records (rows) with the same employee key can exist in the employess_payroll table as well as the same employee can have overtime work more than one days per month. The one-to-many relationship of employees to employees overtime work in the data model is shown in the figure that follows.
Many-to-Many Relationships
In a many-to-many relationship, the key value of one table can appear many times in a related table. It is absolutely certain that you will face many-to-many relationships during the design of a data model and the creation of its database.
Thus, you will have to know how to manage this situation since it causes problems until your database is normalized. In order to solve this problem simply break the many-to-many relationship to one-to-many relationships creating a new table.
So the new table is structured by the repeated keys of the many-to-many tables. Using the example of employees who work in more than one department in a company we have the following structure association of employees and departments entities.
Look at the following entities association figure.