Download presentation
Presentation is loading. Please wait.
Published byClement Rose Modified over 9 years ago
1
Advanced Entity Relationship Concepts
2
Advanced Concepts UIDs Intersection Entities Recursive Relationships Roles Subtypes Exclusivity Historical Fan Traps Non transferability
3
Simple Unique Identifier CUSTOMER # * customer num Single attribute Tag the UID with #
4
Compound UID - Attributes MEMBERSHIP # * num # * start date Multiple attributes Members get a new membership each year but keep their membership number.
5
Compound UID - Composite ACCOUNT * num BANK # * num Use a UID bar to indicate that a relationship is part of the entity’s UID Use # to indicate that the attribute is part of the entity’s UID What would you need to know to identify a specific instance of ACCOUNT? #
6
What do you need to know to identify a specific instance of RENTAL ITEM? Rental item requires the rental transaction num and the inventory num Compound UID - Relationships RENTAL ITEM * rental period return date o RENTAL # * transaction num * transaction date COPY # * inventory num * purchase cost
7
Multi-Level Relationship UIDs What would you need to know to identify a specific instance of TICKET? VENUE PLAY # * title PERFORMANCE # * date # * time # * name CUSTOMER # * name TICKET * seat number
8
Multi-Level Relationship UIDs Venue name + Play title + Performance date + Performance time + Customer name VENUE PLAY # * title PERFORMANCE # * date # * time # * name CUSTOMER # * name TICKET * seat number
9
Multiple UIDs badge num payroll num first and last name EMPLOYEE badge num payroll num last name first name # (1) * # (3) * # (2) * *
10
Composition of a UID SUPPLIER # CODE PERSON # NAME # DATE OF BIRTH Example A Example A SUPPLIER TITLE SUPPLIERTITLE distributor of distributed by available as for Example B Example B RENTAL ITEM RENTAL part of composed of # LINE NO Example C Example C
11
Primary Unique Identifier An entity can have several unique identifiers. One may be appointed as the primary unique identifier. Only the Primary UID is shown in the entity relationship diagram.
12
RENTAL ITEM * rental period return date o RENTAL # * transaction num * transaction date COPY # * inventory num * purchase cost RENTAL # * transaction num * transaction date COPY # * inventory num * purchase cost Intersection Entity Note how Crows’ Feet Change!
13
Intersection Entities: Identifying the Problem TITLE SUPPLIER supplied by supplier of In which entity would you store the attribute: purchase price? # * prod code * name # * supplier no * name
14
Intersection Entities CATALOG ITEM available as SUPPLIER supplier of TITLE # * prod code * name # * supplier no * name * purchase price for
15
Unique Identifiers available as CATALOG ITEM SUPPLIER supplier of TITLE # * prod code * name # * supplier no * name * purchase price for CATALOG ITEM available as SUPPLIER supplier of TITLE # * prod code * name # * supplier no * name # * item num * purchase price for OR
16
Modeling Recursive Relationships...and mine...he’s my manager...but I’m HIS manager! EMPLOYEE manager of managed by
17
Modeling Hierarchical Data Company Division Team Department TEAM # name DEPARTMENT # * name DIVISION # * name COMPANY # * name
18
Hierarchies as Recursive Relationships ORGANIZATION ELEMENT made up of within # * name * type TEAM # name DEPARTMENT # * name DIVISION # * name COMPANY # * name
19
Network Structures COMPONENT # * identifier a part of made up of
20
Network Structures COMPONENT # * identifier a part of made up of COMPONENT made up of a part of # * identifier
21
Network Structures COMPONENT made up of a part of # * identifier ASSEMBLY RULE COMPONENT # * identifier COMPONENT # * identifier made up of a part of for o quantity
22
Network Structures COMPONENT ASSEMBLY RULE a part of made up of for o quantity # * identifier
23
Identifying Roles ENROLLMENT STUDENT COURSE SECTION INSTRUCTOR for included in taken by taught by the teacher of * date enrolled * fee # * id * name * location * start date # * id * name * salary COURSE # * code * name for the subject of
24
Modeling Roles for enrolled on ENROLLMENT * date enrolled COURSE # * code * name PERSON # * id * name o salary * fee taught by for COURSE SECTION * location * start date taken by the teacher of included in
25
Subtypes * category * duration O audio TITLE # * * product code title description * GAME MOVIE * category * medium * minimum memory All titles are either movies or games
26
Creating a Subtype In ERD: Drag and drop. or Draw new entity fully within or around the other. In RON: Set Property Type of. or Drag and drop. Select association for dropped entity. Drag and drop. and Select association for dropped entity. Select Associations Type of Sub Entities
27
Exclusive Entities COMPANY id name telephone num supplier num sales contact # * o * * o COPY acquired from the source of the holder of held by MEMBERSHIP * num * start date * expiry date termination # * inventory num o condition o Company in two roles
28
Splitting Entities COMPANY # * * acquired from the source of the holder of held by id name telephone num * OTHER supplier num sales contact * SUPPLIER MEMBERSHIP * num * start date * expiry date termination # COPY * inventory num o condition o Could teacher-student-person be so modeled?
29
Nesting Entities EMPLOYEE SALES REP TELESALES CLERICAL HUMAN RESOURCES CAR driven by authorized to drive Business Rule: only sales reps can drive company cars
30
Nesting Entities AIRCRAFT AIRPLANE GLIDER POWERED AIRPLANE PROP PLANE JET PLANE HELICOPTERHOVERCRAFT OTHER AIRCRAFT
31
Recursive Subtypes ORGANIZATION ELEMENT TYPE ORGANIZATION ELEMENT made up of ORGANIZATION SUBDIVISION within of the classification for
32
Modeling Exclusive Relationships o o MEMBERSHIP COMPANY CUSTOMER the holder of held by the holder of * num * start date * expiry date o termination * name * postal area 0 contact name * num * first name * last name
33
Creating an Arc CATALOG PUBLICATION REVIEW in of in
34
Modeling Exclusivity “We offer membership to individual customers and companies” MEMBERSHIP CUSTOMER COMPANY MEMBERSHIP CUSTOMER COMPANY MEMBERSHIP CUSTOMER COMPANY MEMBER INDIVIDUAL ORGANIZATION
35
Modeling Data over Time APARTMENT # * code * address PERSON # * id * last name * first name rented by the renter of What if you need to hold an apartment’s rental history?
36
Modeling Data over Time APARTMENT # * code * address PERSON # * id * last name * first name rented by RENTAL HISTORY for the renter of for # * from date to date o
37
Modeling Data over Time the employer of employed by COMPANY # * code * name # * id last name * * first name MEMBER
38
Modeling Data over Time COMPANY # * code * name # * id last name * * first name MEMBER # * from date to date o EMPLOYMENT HISTORY ENTRY for employed by the employer of
39
Fan Traps PERSON POSITION COMPANY # * id * last name * first name # * job title job description o # * code * name the holder of held by included in the employer of employed by
40
Fan Traps PERSON POSITION COMPANY # * id * last name * first name # * job title job description o # * code * name employed as held by the subject of the employer for the employer for employed at POSITION HISTORY ORGANIZATION HISTORY COMPANY HISTORY for * start date end date o * start date end date o * start date end date o
41
Resolving Fan Traps PERSON POSITION COMPANY # * id * last name * first name # * job title job description o # * code * name the employer for for EMPLOYMENT HISTORY a party to at as included in * start date end date o #
42
Transferable Relationships DEPARTMENT # * code PERSON # * id * last name * first name works in employs PersonnelFinanceSales Head office
43
Non-Transferable Relationships COMPANY # * * acquired from the source of id name telephone num supplier num sales contact * * SUPPLIER COPY * inventory num o condition OTHER *
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.