Page 100 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 100

Unit 6: Relational Language and Database Design




          the participation of the entity Department in the relationship manages is said to be total. If the  Notes
          participation is  not total,  then the  participation is said to  be partial. A partial  participation
          example is the participation of the entity set Employees in the relationship Manages, thus every
          employee cannot be a manager of a department.

          6.8 E-R Diagrams

          Now we are in a position to write the ER diagram for the Company database which was introduced
          in the beginning of this unit. The readers are strictly advised to follow the steps shown in this
          unit to design an ER diagram for any chosen problem.
          Step 1: Identify the Strong and Weak Entity Sets


          After careful analysis of the problem we come to a conclusion that there are four possible entity
          sets as shown below:
          1.   Employees               Strong Entity Set

          2.   Departments             Strong Entity Set
          3.   Projects                Strong Entity Set
          4.   Dependents              Weak Entity Set

          Step 2: Identify the Relevant Attributes

          The next step is to get all the attributes that are most applicable for each entity set. Do this work
          by considering each entity set in mind and also the type of attributes. Next job is to pick the
          primary key for strong entity sets and partial key for weak entity sets.


                 Example: Following are the attributes:
          1.   Employees               SSN. Name, Addr, DateOfBirth, Sex, Salary
          2.   Departments             DNo. DName, DLocation
          3.   Projects                PNo. PName, PLocation
          4.   Dependents (weak)       DepName, DateOf Birth, Sex, Relationship
          The underlined attributes are the primary keys and DepName is the partial key of Dependents.
          Also, DLocation may be treated as a multivalued attribute.

          Step 3: Identify the Relationship Sets

          In this step we need to find all the meaningful relationship sets among possible entity sets. This
          step is very tricky, as redundant relationships may lead to complicated design and in turn a bad
          implementation.


                 Example: Let us show below what the possible relationship sets are:
          1.   Employees and Departments      WorksFor
          2.   Employees and Departments      Manages
          3.   Departments and Projects       Controls
          4.   Projects and Employees         WorksOn




                                           LOVELY PROFESSIONAL UNIVERSITY                                   93
   95   96   97   98   99   100   101   102   103   104   105