Discriminator partial key of a weak entity set

Info icon This preview shows pages 16–18. Sign up to view the full content.

View Full Document Right Arrow Icon
Discriminator / Partial Key of a Weak Entity Set Although a weak entity set does not have a primary key, we nevertheless need a means of distinguishing among all those entities in the weak entity set that depend on one particular strong entity. The discriminator or partial key of a weak entity set is a set of attributes that allows this distinction to be made. For example, the discriminator of the weak entity set payment is the attribute payment-number , since, for each loan, a payment number uniquely identifies one single payment for that loan. How the primary key of a weak entity set is formed The primary key of a weak entity set is formed by the primary key of the identifying entity set, plus the weak entity set’s discriminator. In the case of the entity set payment , its primary key is { loan-number , payment-number }, where loan- number is the primary key of the identifying entity set, namely loan , and payment-number distinguishes payment entities within the same loan. Placement of descriptive attributes in a weak entity set The identifying relationship set should have no descriptive attributes, since any required attributes can be associated with the weak entity set. Participation of weak entity sets in relationships head2right A weak entity set can participate in relationships other than the identifying relationship.
Image of page 16

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
13 For instance, the payment entity could participate in a relationship with the account entity set, identifying the account from which the payment was made. head2right A weak entity set may participate as owner in an identifying relationship with another weak entity set. head2right It is also possible to have a weak entity set with more than one identifying entity set. A particular weak entity would then be identified by a combination of entities, one from each identifying entity set. The primary key of the weak entity set would consist of the union of the primary keys of the identifying entity sets, plus the discriminator of the weak entity set. Weak entity sets – should they be designed as multivalued attributes? In some cases, the database designer may choose to express a weak entity set as a multivalued composite attribute of the owner entity set. In our example, this alternative would require that the entity set loan have a multivalued, composite attribute payment , consisting of payment-number , payment-date , and payment-amount . A weak entity set may be more appropriately modeled as an attribute if it participates in only the identifying relationship, and if it has few attributes. Conversely, a weak-entity set representation will more aptly model a situation where the set participates in relationships other than the identifying relationship, and where the weak entity set has several attributes.
Image of page 17
Image of page 18
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern