Page 253 - DCAP405_SOFTWARE_ENGINEERING
P. 253

Software Engineering




                    Notes




                                                     (e) A  Department has  none or  exactly  one  Manager






                                                       (f)  A Department  has  none  or  many  Managers

                                   A one-to-many relationship exists from the entity MANAGER to the entity EMPLOYEE because
                                   there are several employees reporting to the manager. As we just pointed out, there could be an
                                   occurrence of the entity type MANAGER having zero occurrences of the entity type EMPLOYEE
                                   reporting to him or her. A reverse relationship, from EMPLOYEE to  MANAGER, would  be
                                   many to one, since many employees may be supervised by a single manager. However, given
                                   an instance of the entity set EMPLOYEE, there could be  only one instance of the entity set
                                   MANAGER to whom that employee reports (assuming that no employee reports to more than
                                   one manager). The relationship between entities is illustrated in Figure 14.10.
                                                                Figure 14.10  (a) and  (b)







                                                     (a)  (M:1) Many  Employees Report  To one  Manager









                                                            (b)  An instance  of (M:1)  Relation

                                   The relationship between the entity EMPLOYEE and the entity PROJECT can  be derived  as
                                   follows: Each employee could be involved in a number of different projects, and a number of
                                   employees could be working on a given project. This relationship between EMPLOYEE  and
                                   PROJECT is many-to-many. It is illustrated in Figure 14.11.



















          246                               LOVELY PROFESSIONAL UNIVERSITY
   248   249   250   251   252   253   254   255   256   257   258