Advanced Data Modelling: CTI2F3
Advanced Data Modelling: CTI2F3
Advanced Data Modelling: CTI2F3
CTI2F3
Database Modelling & Implementation
Advanced
Data Modelling
2
Learning Outcomes
Students are able to model or develop relational data
from case studies
3
Topics
Supertype and Subtype Representation
4
Basic Concept
• Subtype
• A subgrouping of the entities in an entity type that is meaningful to the organization and
that shares common attributes or relationships distinct from other subgroupings.
• Supertype
• A generic entity type that has a relationship with one or more subtypes.
• Example
• STUDENT is an entity type in a university. Two subtypes of STUDENT are GRADUATE
STUDENT and UNDERGRADUATE STUDENT. In this example, we refer to STUDENT as
the supertype
Notation 6
Example
• A property by which subtype entities
inherit values of all attributes and
instances of all relationships of their
supertype. It’s called as attribute
inheritance.
Completeness Constraints
• A completeness constraint addresses the question of whether an instance of
a supertype must also be a member of at least one subtype.
• The completeness constraint has two possible rules: total specialization and
partial specialization.
• The total specialization rule specifies that each entity instance of the
supertype must be a member of some subtype in the relationship.
• The partial specialization rule specifies that an entity instance of the
supertype is allowed not to belong to any subtype
10
Examples
Disjointness Constraint
• A disjointness constraint addresses whether an instance of a supertype may
simultaneously be a member of two (or more) subtypes.
• The disjointness constraint has two possible rules: the disjoint rule and the
overlap rule
• The disjoint rule specifies that if an entity instance (of the supertype) is a
member of one subtype, it cannot simultaneously be a member of any other
subtype.
• The overlap rule specifies that an entity instance can simultaneously be a
member of two (or more) subtypes
12
Examples
Subtype Discriminator
• A subtype discriminator is an attribute of a supertype whose values
determine the target subtype or subtypes.
• a simple mechanism to consider the problem of inserting a new instance of a
supertype, which of the subtypes (if any) should instance be inserted, when
there is given a supertype/subtype relationship.
Disjoint Subtype (Discriminator)
14
Supertype/Subtype Hierarchies
• It is possible for any of the subtypes
in these examples to have other
subtypes defined on it.
• A supertype/subtype hierarchy is a
hierarchical arrangement of
supertypes and subtypes, where
each subtype has only one
supertype (Elmasri and Navathe,
1994)
• Entity clustering (Teorey, 1999) is a useful way to present a data model for a
large and complex organization.
• An entity cluster is a set of one or more entity types and associated
relationships grouped into a single abstract entity type.
• Because an entity cluster behaves like an entity type, entity clusters and
entity types can be further grouped to form a higher-level entity cluster.
• Entity clustering is a hierarchical decomposition of a macro-level view of the
data model into finer and finer views, eventually resulting in the full, detailed
data model
• Examples of entity
18
Reference
Hoffer, Jeffrey A., et.al., "Modern Database Management", Twelfth Edition,
Pearson, 2016. Chapter 2
Recommended Link:
https://www.codeproject.com/Articles/878359/Data-Modelling-using-ERD-wit
h-Crow-Foot-Notation
https://www.youtube.com/watch?v=xzQQW0NiAMM
20
THANK
YOU