0

I've been making ERD for quite some times but, I encountered a unique case now as follows*:

  1. Every Account may do a Registration
  2. Every Registration requires Acceptance Period
  3. Every Registration requires at least 1 Program or more
  4. There are 2 kinds of Registration, UUI Registration and SEMAS UI Registration. A Registration can either be UUI Registration or SEMAS UI Registration but it can't be both (disjoint)
  5. SEMAS UI Registrasion must be either a SEMAS S1 Registration, SEMAS S2 Registration or SEMAS S3 Registration (disjoint).
  6. UUI Registration and SEMAS S1 Registration records the registrant Prior School
  7. SEMAS S2 Registration and SEMAS S3 Registration records the registrant Prior University

From the description we know that Registration is a weak entity as it cannot exist without Account, Acceptance Period and Program. But Registration has specializations here.

So the question is:

  1. Am I allowed to model UUI Registration and SEMAS UI Registration as subclasses of Registration which is a weak entity?

  2. If it is allowed, how do I model them? As weak entities too or as strong entities?

Thank you for all of your help!

*Ignore attributes

Logos
  • 334
  • 1
  • 7
  • 17

1 Answers1

1

While weak entity sets have an existence dependency on their parent entity sets, existence dependencies don't automatically mean an entity set is a weak entity set. A regular entity set can be required to participate totally in a relationship, which similarly imposes an existence dependency.

To identify weak entity sets, look at how they're identified. A weak entity set's identity / primary key will be a superset of its parent's identity / primary key.

There's no restriction to prevent weak entity sets from having subtypes. However, I haven't seen any examples of how to represent them on ER diagrams. I'm inclined to draw them in the same way as their parent entity sets (i.e. as weak entity sets) since they have the same identity. Another reason is that in classic ER (before EER notation for subtyping), the only way to represent a subtype was as a weak entity set without a weak key.

reaanb
  • 9,806
  • 2
  • 23
  • 37
  • Sorry, I haven't opened stackoverflow for a long time. So, even though an entity existence depends on another entity, it's not always considered as weak entity? What if this is the case: `Building` has `rooms`. Without `building`, `rooms` could not exist. Are `rooms` weak entity? – Logos Mar 13 '18 at 07:00
  • If rooms are identified by their own attributes (e.g. a `room_id`), then `rooms` is a regular entity set. If rooms are partially identified by the building they're in (e.g. a composite key of `(building_id,room_number)`) then it's a weak entity set. – reaanb Mar 13 '18 at 11:22
  • So, the main issue is the primary key then? Even though `rooms` existence depends on `building`, it will still be a regular entity if it has its own primary key which is independent from other entity's attribute. If this is the case, how do we identify that `rooms` depends on `building` to exist in the diagram? – Logos Mar 13 '18 at 11:27
  • The concept in ER is called participation - we would say that `rooms` participate fully in the relationship with `buildings` and it's indicated with a double line between the rectangle for `rooms` and the diamond for its relationship with `buildings`. – reaanb Mar 13 '18 at 12:36