De presentatie wordt gedownload. Even geduld aub

De presentatie wordt gedownload. Even geduld aub

GegevensAnalyse Les 2: Bouwstenen en bouwen. CUSTOMER: The Entity Class and Two Entity Instances.

Verwante presentaties

Presentatie over: "GegevensAnalyse Les 2: Bouwstenen en bouwen. CUSTOMER: The Entity Class and Two Entity Instances."— Transcript van de presentatie:

1 GegevensAnalyse Les 2: Bouwstenen en bouwen

2 CUSTOMER: The Entity Class and Two Entity Instances

3 Attributes Attributes describe an entity’s characteristics. All entity instances of a given entity class have the same attributes, but vary in the values of those attributes. Originally shown in data models as ellipses. Data modeling products today commonly show attributes in rectangular form.

4 Binary Relationship

5 The Three Types of Maximum Cardinality

6 The Three Types of Minimum Cardinality

7 ID-Dependent Entities An ID-dependent entity is an entity (child) whose identifier includes the identifier of another entity (parent). The ID-dependent entity is a logical extension or sub-unit of the parent: –BUILDING : APARTMENT –PAINTING : PRINT The minimum cardinality from the ID-dependent entity to the parent is always one.

8 ID-Dependent Entities A solid line indicates an identifying relationship

9 Weak Entities A weak entity is an entity whose exisitence depends upon another entity. All ID-Dependent entities are considered weak. But there are also non-ID-dependent weak entities. –The identifier of the parent does not appear in the identifier of the weak child entity.

10 Weak Entities (Continued) A dashed line indicates a nonidentifying relationship Weak entities must be indicated by an accompanying text box in Erwin – There is no specific notation for a nonidentifying but weak entity relationship

11 ID-Dependent and Weak Entities

12 Subtype Entities A subtype entity is a special case of a supertype entity: –STUDENT : UNDERGRADUATE or GRADUATE The supertype contains all common attributes, while the subtypes contain specific attributes. The supertype may have a discriminator attribute that indicates the subtype.

13 Subtypes with a Discriminator

14 Subtypes: Exclusive or Inclusive If subtypes are exclusive, one supertype relates to at most one subtype. If subtypes are inclusive, one supertype can relate to one or more subtypes.

15 Subtypes: Exclusive or Inclusive (Continued)

16 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-16 Subtypes: IS-A relationships Relationships connecting supertypes and subtypes are called IS-A relationships, because a subtype IS A supertype. The identifer of the supertype and all of its subtypes must be identical, i.e., the identifier of the supertype becomes the identifier of the related subtype(s). Subtypes are used to avoid value- inappropriate nulls.

17 HAS-A Relationships The relationships we have been discussing are known as HAS-A relationships: –Each entity instance has a relationship with another entity instance: An EMPLOYEE has one or more COMPUTERs. A COMPUTER has an assigned EMPLOYEE.

18 Recursieve relaties Kunnen meerdere dokters andere dokters bedokteren? Kan een student een student begeleiden? Kan een student meerdere studenten begeleiden? In deze relaties zit de sleutel van de tabel als vreemde sleutel in dezelfde tabel

19 Stappenplan “W”→ERD Benoem elk ZNW Hergroepeer de ZNW (=elementen) Is er overlap in elementen? Benoem de groepen (entiteiten) De elementen zijn attributen Stel “use cases” op Ga mbv.UC de relaties opstellen Bepaal (op recordniveau) de relaties (cardinaliteiten.

20 Stappenplan vervolg: Ga op zoek naar bekende patronen!!! Ga op zoek naar patronen die je al kent!! Gebruik je kennis van patronen op nieuwe situaties!!! Enz…

Download ppt "GegevensAnalyse Les 2: Bouwstenen en bouwen. CUSTOMER: The Entity Class and Two Entity Instances."

Verwante presentaties

Ads door Google