Академический Документы
Профессиональный Документы
Культура Документы
SUBTYPES
Objectives
After completing this chapter, you should be able to:
Basic Definitions
Inheritance:
Subtype entities inherit values of all
Basics continued...
Basics continued...
Relationships continued...
Generalization
The process of categorizing entities by their
Example
Specialization
The process of defining one or more subtypes of the supertype, and forming supertype/subtype relationships.
Constraints in Supertype
Completeness Constraints
Disjointness Constraints
Completeness Constraints
Addresses the question of whether an instance of a
Disjointness Constraints
Addresses the question of whether an instance of a Super type may simultaneously be a member of two (or more) subtypes. The disjoint rule specifies that if an entity instance is a member of one subtype, it cannot simultaneously be a member of any other subtype. It is denoted by the letter d. The overlap rule specifies that an entity instance can simultaneously be a member of two (or more) subtypes.
Constraints in Discriminators
Subtype Discriminator
It is an attribute of the supertype whose values determine the target subtype(s). It is used to direct into which of the subtypes (if any) a new instance of the supertype should be inserted. Disjoint a simple attribute with alternative values to indicate the possible subtypes. Overlapping a composite attribute whose subparts
Supertype/Subtype Hierarchy
It is a hierarchical arrangement of supertypes and subtypes, where each subtype has only one supertype. In this hierarchy, attributes are assigned at the highest
Domain
A domain is a conceptual pool of values from which
one or more attributes draw their actual values. Examples:
Defining a Domain
Syntax:
CREATE { DOMAIN | DATATYPE } [ AS ] domain-name
Summary
You now should be able to:
Describe advanced concepts of database design Define Subtypes and Supertypes Describe Generalization and Specialization