0

Are there any weak entities. How can I identify an weak entity. If you do find a weak entity, could you please explain to me why it is a weak entity. How is it that you came to that conclusion? Please let me know.

Aggregation: -Library

Entities:

-Resource -Book -Cubicle -Loan application for book -Books loaned -Employee -Contracted(Signs loan for books) -Practicing(confirmes loan application for users online) -Cubicle loan -User(applies for book loan or cubicle loan) -Penalty(given to user if they have books overdue)

Mishael
  • 1
  • 2

1 Answers1

1

A weak entity set is one that can't be identified by its own attributes. Weak entity sets are identified, at least partially, by their relationship with another entity set. This means that a weak entity set's primary key will contain a foreign key.

For example:

Invoice (invoice_id PK, ...)
LineItem (invoice_id FK/PK, line_number PK, ...)

In order to identify weak entity sets in your example, we need to know how your entity sets are identified. This is a design decision, not something inherent in any entity set. Any weak entity set can be converted into a regular entity set through the introduction of a surrogate key, which also converts the identifying relationship with its parent into a regular relationship. Thus, there's no way to know until you decide how to identify your entity sets.

Think about how you would identify each entity set. Books are often identified by ISBN numbers, which would count as its own attribute. How would you identify multiple copies of a book? Each could get its own serial number, or one could number the copies of each ISBN. That latter method indicates a weak entity set. How about cubicles? Does each cubicle have its own unique identity, or are they numbered relative to a specific room/floor/building/site/company? In the latter case, it may be a good idea to model it as a weak entity set. Book loans can be identified via a surrogate key or a combination of the book identifier and loan date. For each entity set, it's possible to imagine it as a regular or weak entity set.

reaanb
  • 9,806
  • 2
  • 23
  • 37