In the second step, we create, and we append to the conceptual schema, associations and association classes.
We find two associations: EMPLOYEE Works-on PROJECT, and EMPLOYEE Supervises EMPLOYEE. We append the associations to the conceptual schema and we get a class diagram given on the present slide.
Next, we must provide the multiplicities for each association. An association Works-on is many-to-many because an employee can work on many projects, and a project can be implemented by many employees. To find we imagine to be an employee and we ask ourselves a question: how many projects I can work on ? In this domain, we are allowed to work on many projects. Then, we imagine to be a project and we ask ourselves a question: how many employees can participate in my implementation. In the present domain, a project can be implemented by many employees.
Next we can look at minimal multiplicities of the associations. Does every employee must work on at least one project ? We assume that it makes sense to have all employees working on at least one project. The second question: Do we have projects with no employees ? Well, our assumption is: no, every project must have at least one employee assigned to it.
We assume, that participation of both classes in the association is compulsory. As a consequence, an employee must work on at least one projects, and a project must be implemented by at least one employee and an association Works-on is mandatory on both sides.
An association, EMPLOYEE Supervise EMPLOYEE is zero-to-many, because an employee can supervise zero or more employees. Bottom level employees in a managerial hierarchy supervise no employees. On the other side a multiplicity of the same association expressed in a way EMPLOYEE Is-supervised-by EMPLOYEE is optional because every employee except ceo has at most one supervisor. A ceo does not have any supervisors. It is why an association Is-supervised by has multiplicity zero-or-one.
It is important to note, that a decision whether minimal multiplicity of association is zero or one strongly depends on our subjective view of the reality. For a single domain it is possible to argue that minimal multiplicity is zero and not one. If we decide that a minimal multiplicity is one then the existence of a link is strongly bound with the existence of an instance of an object. An instance of an object cannot exists with out a link and whenever a new instance of an object is added we also must add a link. In our case one may argue that when a project is created then for certain period of time no employees are assigned and because of that an association PROJECT Has EMPLOYEE is optional on PROJECT side. Luckily, minimal multiplicity does not have an important impact during a stage of logical design where a conceptual schema is converted into implementation schema of a particular database system.