Professional Documents
Culture Documents
Csis240 Lec w03.1
Csis240 Lec w03.1
Chapters 3 and 4
Drawing ERDs
1
3&4
Practice … (correction)
M
EMPLOYEE
is assigned to manages
1
1 M 1
DEPARTMENT is composed of DIVISION
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 2
3&4
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 3
3&4
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 4
3&4
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 5
3&4
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 6
3&4
Keys
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7
3&4
Keys (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 8
3&4
Keys (continued)
• Nulls:
– No data entry
– Not permitted in primary key
– Should be avoided in other attributes
– Can represent
• An unknown attribute value
• A known, but missing, attribute value
• A “not applicable” condition
– Can create problems when functions such as
COUNT, AVERAGE, and SUM are used
– Can create logical problems when relational tables
are linked
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 9
3&4
Keys (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 10
3&4
STUDENT
Attributes
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 13
3&4
Multivalued Attributes
Represented by a
double line
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 14
3&4
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 15
3&4
Resolving Multivalued Attribute Problems
(continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 16
3&4
Derived Attributes (continued)
Represented by a
dashed line
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 17
3&4
• Connectivity
– Used to describe the relationship classification
(based on participation)
• Cardinality
– Expresses minimum and maximum number of
entity occurrences associated with one
occurrence of related entity
• Established by very concise statements
known as business rules
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 18
3&4
Cardinality
M N
EMPLOYEE is assigned to PROJECT
Connectivity
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 19
3&4
Relationship Participation
• Optional participation
– One entity occurrence does not require
corresponding entity occurrence in particular
relationship
• Mandatory participation
– One entity occurrence requires corresponding
entity occurrence in particular relationship
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 20
3&4
Relationship Strength
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 21
3&4
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 22
3&4
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 23
3&4
Weak Entities
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 24
3&4
Weak Entities (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 25
3&4
Relationship Degree
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 26
3&4
Relationship Degree (continued)
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 27
3&4
Composite Entities
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 28
3&4
Mandatory
participation
1, N, M
Source: http://io.uwinnipeg.ca/~rmcfadye/2914/ERD/images/1entit4.gif
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 29
3&4
Practice ...
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 30
3&4
Practice ...
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 31
3&4
Practice ...
Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 32