Presentation is loading. Please wait.

Presentation is loading. Please wait.

Weak Entity Sets. Occasionally, entities of an entity set need “help” to identify them uniquely. Example. Crews might have a number and some description,

Similar presentations


Presentation on theme: "Weak Entity Sets. Occasionally, entities of an entity set need “help” to identify them uniquely. Example. Crews might have a number and some description,"— Presentation transcript:

1 Weak Entity Sets

2 Occasionally, entities of an entity set need “help” to identify them uniquely. Example. Crews might have a number and some description, –E.g. “Crew 1, Special Effects.” However, there can be another crew with the same data “Crew 1, Special Effects” but which belongs to another studio. –We need to add the key for Studios, in order to have a key for Crews. –We say "Crews" is a weak entity set. Entity set E is weak if in order to identify entities of E uniquely, we need to follow one or more many-one relationships from E and include the key of the related entities from the connected entity sets.

3 In E/R diagrams Crews Studios Unit-of number role name address No. of emp. Double diamond for supporting many-one relationship. Double rectangle for the weak entity set.

4 Another Example – Football Players name is almost a key for football players, but there might be two with the same name. number is certainly not a key, since players on two teams could have the same number. But number, together with the team name related to the player by Plays-on should be unique.

5 In E/R Diagrams PlayersTeams Plays- on name number Double diamond for supporting many-one relationship. Double rectangle for the weak entity set.

6 Weak Entity-Set Rules A weak entity set has one or more many-one relationships to other (supporting) entity sets. –Not every many-one relationship from a weak entity set need be supporting. The key for a weak entity set is its own underlined attributes and the keys for the supporting entity sets.

7 Supporting relationships If there are more than one supporting relationships, then all of them will “bring” a key component for the key of the weak entity set. (E.g. grade-report, student, course). Not all the many-one relationships connecting a weak entity set (many side) to other entity sets are supporting relationships. E.g. Crews Studios Unit-of number role nameaddress No. of emp. Operat. Cities Op

8 When Do We Need Weak Entity Sets? The usual reason is that there is no global authority capable of creating unique ID’s (surrogate key). Example: it is unlikely that there could be an agreement to assign unique player numbers across all football teams in the world.


Download ppt "Weak Entity Sets. Occasionally, entities of an entity set need “help” to identify them uniquely. Example. Crews might have a number and some description,"

Similar presentations


Ads by Google