Page 104 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 104

Unit 6: Relational Language and Database Design




          6.10 Weak Entity Sets                                                                 Notes

          An entity set attributes that does not have a primary key within them, is termed as a weak entity
          set. As an example, consider the entity set Payment, which has the three attributes: payment -
          number, payment - date and payment - amount, illustrated with the following E-R diagram:

                                            Figure  6.8


                                                         Payment-date
                 loan-no        amount

                                                  Payment-number      payment-amount





                     Loan                                         Payments
                                         Loan Payment



          A weak entity set Payment is indicated in E-R diagram by a doubly outlined box, because each
          payment entity is district, payments for different loans may share the same payment number.
          Thus, this entity set does not have a primary key, it is a weak entity set.
          In the above figure, the weak entity set Payment is dependent on the strong entity set Loan (An
          entity set that has a primary key is termed as a strong entity set), via the relationship loan-
          payment identified by a double outlined diamond.

          The  below  figure  illustrates  the  use  of  double lines  to  indicate  total  participation.  The
          participation of the weak entity set Payment in the relationship loan-payment is total; it means
          that every payment must be related via loan-payment to some account. The arrow from loan-
          payment to loan indicates that each payment is for a single loan.
          The discriminator of a weak entity set is underlined with a dashed, rather than a solid line. The
          discriminator of the weak entity set Payment is the attribute payment-number, which is formed
          by the primary key loan-number of the strong entity set Loan on which the weak entity set is
          dependent.  That is, in this  case of the weak entity set  payment, its  temporary primary  key
          (discriminator) is {loan-number, payment-number}, where loan -number identifies the dominant
          entity of a Payment, and payment - number distinguishes payment entities within the same
          loan.

          An entity set that has a primary key is termed as a strong entity set.

                 Example: The entity set loan in the above figure is a strong entity set with its primary
          key loan-number.

          6.11 Extended ER Features


          6.11.1 Class Hierarchies

          To classify the entities in an entity set into subclass entity is known as class hierarchies. Example,
          we might want to classify Employees entity set into subclass entities Hourly-Emps entity set




                                           LOVELY PROFESSIONAL UNIVERSITY                                   97
   99   100   101   102   103   104   105   106   107   108   109