Title: Chapter 5: The Relational Data Model
1(No Transcript)
2Chapter 4 The Enhanced E-R Model and Business
Rules
3Supertypes and Subtypes
- One of the major challenges in data modeling is
to recognize and clearly represent entities that
are almost the same that is, entity types that
share common properties but also have one or more
distinct properties that are of interest to the
organization. - Supertype
- Subtype
- ?
4Attributes
- Subtypes inherit all supertype attributes
- Subtypes have attributes that are different from
other subtypes - ?
5(No Transcript)
6All employee subtypes will have emp nbr, name,
address, and date-hired
Each employee subtype will also have its own
attributes
7When to use Super/Subtypes
- Attributes apply to some but not all instances of
an entity - Instances of a subtype participate in
relationships unique to that subtype - Generalization and specialization
- generalization from sub to super
- specialization from super to sub
- ?
8Both outpatients and resident patients are cared
for by a responsible physician
Only resident patients are assigned to a bed
9All these types of vehicles have common attributes
10So we put the shared attributes in a supertype
11Applies only to purchased parts
Only applies to manufactured parts
12Created 2 subtypes
13Constraints
- Completeness
- must every supertype member also be a subtype
member? - total or partial specialization
- Disjointedness
- can an instance of a supertype be in more than
one subtype? - disjoint or overlap
- subtype discriminator
- Boolean attribute
- ?
14(No Transcript)
15(No Transcript)
16(No Transcript)
17(No Transcript)
18(No Transcript)
19(No Transcript)
20Hierarchies
- Subtypes can be supertypes as well
- a subtype is subordinate to one and only one
supertype a supertype can have many subtypes - Attributes are assigned at the highest possible
level - Subtypes inherit attributes from all supertypes
above them in the hierarchy - ?
21(No Transcript)
22Entity Clustering
- Entity cluster A set of one or more entity
types and associated relationships grouped into a
single abstract entity type. - Simplifies complex diagrams in analysis phase
23Classifications of Business Rules
- Derivation
- Based on other knowledge in the business
- Structural assertion
- Static, often captured in E-R diagram
- Terms
- Facts
- Action assertion
- Constraint or control on action/behavior
- ?
24Classifying Action Assertions
- Result focused
- Conditions (if then)
- Integrity (domain, referential)
- Authority
- Form of assertion
- Enabler
- Timer
- Executive
- Rigor
- Controlling
- Influencing
- ?
25Types of Constraints
- Restricted relation x cannot exist unless
relation y exists for these entity instances - Limit an upper limit exists for the number of
relations z that can be set from a given instance
of entity a - ?
26(No Transcript)