CSBP430 - PowerPoint PPT Presentation

About This Presentation
Title:

CSBP430

Description:

... is a member of a subclass inherits all the attributes of the entity. ... Composite attribute. Qualified association/Qualified aggregation) Week Entity. Class ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 26
Provided by: elarbi
Category:
Tags: csbp430

less

Transcript and Presenter's Notes

Title: CSBP430


1
CSBP430 Database SystemsChapter 4 Enhanced
EntityRelationship and Object Modeling
  • Elarbi Badidi
  • College of Information Technology
  • United Arab Emirates University
  • ebadidi_at_uaeu.ac.ae

2
In these chapter, you will learn
  • Subclasses, Superclasses, and Inheritance
  • Specialization and Generalization

3
PROBLEM with ER notation (Chapter 4, pp. 7389,
93-95)
  • Different databases have become commonplace
    (engineering manufacturing, multimedia, GIS,
    database for indexing the WWW, bioinformatics).
  • We (DB designers) need to use additional semantic
    data modeling concepts to represent these
    requirements as accurately and clearly as
    possible.
  • THE ENTITY RELATIONSHIP MODEL IN ITS ORIGINAL
    FORM DID NOT SUPPORT THE GENERALIZATION
    ABSTRACTION.

4
Extended Entity-Relationship (EER) Model
  • Incorporates Set-subset relationships
  • Incorporates Generalization Hierarchies
  • NEXT SECTION OF THIS Presentation ILLUSTRATES HOW
    THE ER MODEL CAN BE EXTENDED WITH
  • Set-subset relationships and Generalization
    Hierarchies and how we can impose further
    notation on them.

5
Entity Subclasses, Superclasses, and Inheritance
  • Superclass/subclass, class/subclass relationship
  • The relationship between a superclass and any one
    of its subclasses.
  • Employee/secretary, employee/technical.
  • Entity that is a member of a subclass inherits
    all the attributes of the entity.
  • Supertype has shared attributes
  • Subtypes have unique attributes

6
Specialization and Generalization
  • Specialization is the process of defining a set
    of subclasses of an entity type.
  • Define a set of subclasses of an entity type.
  • Based on job type secretary, engineer,
    technician.
  • Based on method of pay salaried-employee,
    hourly-employee. Fig 4.1.
  • Car and truck as a specialization of vehicle.
  • Establish additional specific attributes with
    each subclass.
  • Secretary subclass has an attribute TypingSpeed.
  • Engineer subclass has an attribute EngineerType.

7

8

9
Specialization and Generalization
  • Generalization, reverse process in which defining
    a generalized entity type from the given entity
    types.
  • vehicle as a generalization of car and truck.
    Fig 4.3.

10
(No Transcript)
11
Constraints on Specialization/Generalization
  • Specialization may consists of multiple
    subclasses (circle notation) or a single subclass
    (no circle notation).
  • Disjointness Constraint.
  • Entity must be a member of at most one of the
    subclasses. It uses (d) notation.
  • Overlap Constraint.
  • Entity may be a member of more than one subclass.
    It uses (o) notation.
  • Total Specialization.
  • Every entity in the superclass MUST be a member
    of some subclass. It uses double line notation.
  • Partial Specialization.
  • Entity does not have to belong to any of the
    subclasses. Employee does not belong to
    secretary, engineer, technician.

12
(No Transcript)
13
Specialization/Generalization Hierarchies and
Lattices
  • Specialization Hierarchy.
  • A subclass participates as a subclass in only one
    class/subclass relationship.
  • Specialization Lattice.
  • A subclass can be a subclass in more than one
    class/subclass relationship.
  • Leaf Node.
  • Class that has no subclass of its own.
  • Shared Subclass.
  • Subclass with more than one superclass (Fig 4.6).
  • Multiple Inheritance
  • Entity inherits attributes and relationships from
    multiple classes.

14
(No Transcript)
15
MULTIPLE INHERITANCE
  • In a specialization hierarchy, every subclass has
    only one superclass.
  • In a specialization lattice, a subclass can have
    more than one superclass.
  • The subclass is referred to as a shared subclass.
  • A specialization lattice demonstrates multiple
    inheritance.
  • A shared subclass must satisfy the multiple
    inheritance intersection constraint, where each
    instance of the shared subclass is an instance of
    all of its superclasses.

16
MULTIPLE INHERITANCE
17
Utilizing Specialization and Generalization in
Conceptual Data Modeling
  • Top-down Conceptual Refinement Process (Fig 4.7)
  • Bottom-up Conceptual Process.

18
(No Transcript)
19
Modeling of UNION Types Using Categories
  • Union Type/Category is a class which represent a
    collection of objects.
  • Single superclass/subclass relationship with more
    than one superclass, where the superclasses
    represent different entity types. Use (U)
    notation.
  • An owner of a vehicle can be a person, a bank, or
    a company (Fig 4.8).

20
Categories
21
Constraints on categorization
  • Total categorization - Every instance of a
    superclass must be an instance of the category.
  • Partial categorization - An instance of a
    superclass is not required to be an instance of
    the category.

C A ? B
F ? (D ? E)
22
Example Partial Categorization of Sponsor
23
Conceptual Object Modeling Using UML Class
Diagrams
  • Universal/Unified Modeling Language (UML) is
    usually used for software design.
  • UML has many diagrams (Class, Composite,
    Deployment, State, Sequence, Activity,
    Communication, Use Case, Package).
  • Class diagram is displayed as a box with three
    sections class name, attributes, operations.
  • Class diagram is similar to EER.

24
Conceptual Object Modeling Using UML Class
Diagrams
Deployment Diagram
Class Diagram
Component Diagram
Use Case Diagram
Structure Diagram
Sequence Diagram
25
Conceptual Object Modeling Using UML Class
Diagrams (Fig 4.11)
EER UML
Entity Class
Week Entity Qualified association/Qualified aggregation)
Composite attribute Structured domain
Multivalue attribute Separate class
Relationship Associations
(min, max) Multiplicities
Write a Comment
User Comments (0)
About PowerShow.com