Advanced Data Modeling Concepts and Tools - PowerPoint PPT Presentation

1 / 68
About This Presentation
Title:

Advanced Data Modeling Concepts and Tools

Description:

Data-oriented approach - because data are more stable ... Trunk capacity. Automobile. Set Type. Motor Bike. Cargo Space. Truck. Name. Location. Contact Name ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 69
Provided by: Chan86
Category:

less

Transcript and Presenter's Notes

Title: Advanced Data Modeling Concepts and Tools


1
Advanced Data Modeling Concepts and Tools
  • CS 95 Advanced Database Systems
  • Handout 2

2
The Database Design Process (Revisited)
  • Phases of Database Design
  • Conceptual Design using Semantic Data
    Modeling Tools, e.g.
  • Entity-Relationship Model
  • Enhanced ER Model
  • Object-oriented Data Model
  • Object-relational Data Model

Steps in DB Design
Requirements Definition
Develop Conceptual Model
Logical/Physical Design
Design Application
Data-oriented approach - because data are more
stable than the functions (or processes) in an
organization.
3
Database Design and Conceptual Data Modeling
  • Analogous to analysis phase of software
    development
  • Requirement Collection and Analysis
  • - Designers interview database users to
    understand and document data requirements.
  • Functional Requirements
  • - User defined operations to be applied on the
    database

4
Database Design and Conceptual Data Modeling
(contd)
  • Conceptual Design
  • -Conceptual schema a permanent description of
    database specifications.
  • - Capture the semantics of the data description
    of data, constraints, relationships
  • - No storage or physical details yet
  • - Use of semantic data modeling tools (e.g. ERD)
  • - relational model is not a semantic data model

5
What is a data model?
  • Description in high-level model
  • - Close to the user' view of mini-world
  • - Abstract concepts
  • - Means of communication between the
    non-technical users and the developer
  • - Allows user to influence design and is
    independent of any particular DBMS.
  • Examples ER, Enhanced ER, Object-Oriented and
    Object-Relational Data Model
  • Unified Modeling Language (UML) - data modeling
    subset (i.e., structural
    modeling subset)

6
Enhanced Entity-Relationship Model (Concepts/Featu
res)
  • Subclass/superclass (or subtype/supertype)
  • Specialization -- define subclasses
  • Generalization -- define superclass
  • Constraints on Specialization
  • Disjointness (Disjoint or Overlap)
  • Completeness (Total or Partial Specialization)
  • Inheritance.
  • Hierarchies and Lattices
  • Union Types (Categories)

7
Semantic Data Models
Most common database management systems represent
information in a simple record-based format,
semantic modeling
  • provides richer data structuring capabilities for
    database applications
  • provide mechanisms for representing structurally
    complex interrelations among data typically
    arising in commercial applications
  • complements work on knowledge representation (in
    artificial intelligence) and on the new
    generation of database models based on the
    object-oriented paradigm of programming
    languages.

8
Enhanced ER Model (EER)
  • EER Model ER Model Extensions
  • Extensions
  • - Subclass (Specialization)
  • - Superclass (Generalization)
  • - Category
  • - Attribute and Relation Inheritance

9
Subclass/Superclass
  • Subclass Entities of an Entity type sharing a
    set of attribute which are grouped
    together
  • Superclass The parent entity type from which
    subclasses are formed
  • Class/Subclass relationship Relationship between
    a superclass and one of the subclasses
  • Specialization The process of forming subclasses
    from a superclass

10
Subclass/Superclass (contd.)
  • Type Inheritance Member of subclass possessing
    all attributes and relationships of a member of
    superclass
  • Local Attributes Attributes that apply only to
    members of a subclass (a.k.a. specific attribute)
  • Local Relationships Relationships applicable
    only to members of a subclass(a.k.a. specific
    relationships)
  • Generalization Process of forming a supercalss
    from subclasses. (Functionally, inverse of
    specialization)

11
Specialization/Generalization Characteristics
  • Several Specializations could be defined on the
    same entity type (Superclass)
  • Specialization with single subclass is also
    permitted
  • Predicate-defined subclass Specialization
    specified by a condition on the value some
    attribute of superclass. (a.k.a.
    condition-defined)
  • Defining predicate Condition satisfied by all
    members of a predicate-defined subclass

12
Specialization/Generalization Characteristics
(contd.)
  • Attribute-defined specialization All subclasses
    having membership condition on the same attribute
    of the superclass
  • Defining Attributes No condition exists for
    determing membership in the subclass

13
Specialization/Generalization Constraints
  • Disjointness constraint Subclasses of the
    specialization must be disjoint (an entity is a
    member of at most one subclass)
  • - Overlapping Subclasses not constrained to be
    disjoint
  • Completeness Constraint
  • - Total Every entity in superclass must be a
    member of some subclass (e.g.\HOURLY\_EMPLOYEE,
    SALARIED\_EMPLOYEE\

14
Specialization/Generalization Constraints (contd.)
  • - Partial An entity in superclass may not be a
    member of any subclass
  • Disjointness and Completeness are independent.
    (leads to 4 possible constraints on
    specialization)
  • - Disjoint, Total
  • - Disjoint, Partial
  • - Overlapping, Total
  • - Overlapping, Partial

15
Specialization Hierarchies and Lattices
  • Subclass may have further subclasses, and so on.
  • Specialization Hierarchy Every subclass
    participates in only one
    class/subclass relationship
  • Specialization Lattice A subclass can
    participate in more than one
    class/subclass relationship
  • Leaf Node A class that has no subclass

16
Specialization Hierarchies and Lattices (contd
.)
  • Shared Subclass A subclass with more than one
    superclass
  • Multiple Inheritance A shared subclass
    inheriting attributes and relationships from
    multiple (super) classes

17
Union Type/Categories
  • Uniontype (Category) Subclass with
    class/subclass relationship with more than one
    superclass of different entity types
  • Category is a subset of the union of its
    superclass
  • An entity in Category is a member of only one of
    its superclass
  • Category types Total or Partial

18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
Object-Oriented Data Model
  • Object models describe the system in terms of
    object classes. An object class is an abstraction
    over a set of objects with common attributes and
    the services (operations) provided by each object
  • Various object models may be produced
  • Inheritance models
  • Aggregation models
  • Relation models
  • Service models
  • Object databases allow storage of complex data
    types or objects and supports inheritance,
    polymorphism, and encapsulation for full
    object-oriented development

23
Object-Oriented Data Model
  • Natural ways of reflecting the real-world
    entities manipulated by the system
  • More abstract entities are more difficult to
    model using this approach
  • Object class identification is recognized as a
    difficult process requiring a deep understanding
    of the application domain
  • Object classes reflecting domain entities are
    reusable across systems

24
Key OO Concepts
  • Classes
  • Objects
  • Methods/Operation
  • Messages
  • Inheritance
  • Complex Objects
  • Encapsulation
  • Persistence
  • Polymorphism/Operator Overloading
  • Multiple/Selective Inheritance

25
Approximate Equivalence of Object-Oriented and
Conventional Data Modeling Terms
  • Object-Oriented
  • Object
  • Object Class
  • Instance attribute
  • Instance attribute constraint
  • Method
  • Message
  • Conventional
  • Record instance, row
  • Record type, table
  • Field
  • Field type
  • Procedure
  • Procedure call

26
Object-Oriented Data Model Example
Company
Person
Name Location Contact Name
Name Birthday
Vehicle
Serial Weight Wheelbase Manufacturer
Auto Company
Allocation Total Sales
Cargo Space
Set Type
Trunk capacity
Foreign Auto Company
Import Limits Trade Representative
Truck
Automobile
Motor Bike
Legend
Class-subclass
Attribute/aggregation association
27
(No Transcript)
28
(No Transcript)
29
Object-Relational Data Model
  • Hybrid data model combining relational and
    object-oriented model features
  • Object-relational database is a hybrid type of
    database, i.e., the relational database server is
    usually extended to support objects as if they
    are new data types

30
Unified Modeling Language(UML)
31
Why do we model?
  • Provide structure for problem solving
  • Experiment to explore multiple solutions
  • Furnish abstractions to manage complexity
  • Reduce time-to-market for business problem
    solutions
  • Decrease development costs
  • Manage the risk of mistakes

32
Why do we model graphically?
  • Graphics reveal data.
  • Edward TufteThe Visual Display of Quantitative
    Information, 1983
  • 1 bitmap 1 megaword.
  • Anonymous visual modeler

33
UML - Quick Tour
  • The UML is a graphical language for specifying,
    visualizing, constructing and documenting the
    artifacts of software systems
  • Added to the list of OMG adopted technologies in
    November 1997 as UML 1.1
  • Most recent minor revision is UML 1.3, adopted in
    November 1999
  • Next minor revision will be UML 1.4, planned to
    be adopted in Q2 2001
  • Next major revision will be UML 2.0, planned to
    be completed in 2002

34
UML Goals
  • Define an easy-to-learn but semantically rich
    visual modeling language
  • Unify the Booch, OMT, and Objectory modeling
    languages
  • Include ideas from other modeling languages
  • Incorporate industry best practices
  • Address contemporary software development issues
  • scale, distribution, concurrency, executability,
    etc.
  • Provide flexibility for applying different
    processes
  • Enable model interchange and define repository
    interfaces

35
OMG UML Contributors
Microsoft ObjecTimeOraclePtech OAO Technology
SolutionsRational SoftwareReich SAP Softeam Ster
ling Software Sun Taskon TelelogicUnisys
AonixColorado State University Computer
Associates Concept Five Data Access EDS Enea
Data Hewlett-Packard IBM I-LogixInLine
Software Intellicorp Kabira TechnologiesKlasse
Objecten Lockheed Martin
36
Building Blocks
  • The basic building blocks of UML are
  • model elements (classes, interfaces, components,
    use cases, etc.)
  • relationships (associations, generalization,
    dependencies, etc.)
  • diagrams (class diagrams, use case diagrams,
    interaction diagrams, etc.)
  • Simple building blocks are used to create large,
    complex structures
  • cf. elements, bonds and molecules in chemistry
  • cf. components, connectors and circuit boards in
    hardware

37
Unifying Concepts
  • classifier-instance dichotomy
  • e.g., an object is an instance of a class ORa
    class is the classifier of an object
  • specification-realization dichotomy
  • e.g., an interface is a specification of a class
    ORa class is a realization of an interface
  • analysis-time vs. design-time vs. run-time
  • modeling phases (process creep)
  • usage guidelines suggested, not enforced

38
What is structural modeling?
  • Structural model a view of an system that
    emphasizes the structure of the objects,
    including their classifiers, relationships,
    attributes and operations.
  • Data modeling is a subset of structural modeling

39
Structural Modeling Core Elements
40
Structural Modeling Core Elements (contd)
¹ An extension mechanism useful for specifying
structural elements.
41
Structural Modeling Core Relationships
42
Structural Modeling Core Relationships (contd)
43
Structural Diagram Tour
  • Show the static structure of the model
  • the entities that exist (e.g., classes,
    interfaces, components, nodes)
  • internal structure
  • relationship to other entities
  • Do not show
  • temporal information
  • Kinds
  • static structural diagrams
  • class diagram
  • object diagram
  • implementation diagrams
  • component diagram
  • deployment diagram

44
Static Structural Diagrams
  • Shows a graph of classifier elements connected by
    static relationships.
  • kinds
  • class diagram classifier view
  • object diagram instance view

45
Classes
Fig. 3-20, UML Notation Guide
46
Classes compartments with names
Fig. 3-23, UML Notation Guide
47
Classes method body
Fig. 3-24, UML Notation Guide
48
Types and Implementation Classes
Fig. 3-27, UML Notation Guide
49
Interfaces Shorthand Notation
Fig. 3-29, UML Notation Guide
50
Interfaces Longhand Notation
Fig. 3-29, UML Notation Guide
51
Associations
Fig. 3-40, UML Notation Guide
52
Association Ends
Fig. 3-41, UML Notation Guide
53
Ternary Associations
Fig. 3-44, UML Notation Guide
54
Composition
Fig. 3-45, UML Notation Guide
55
Composition (contd)
Fig. 3-45, UML Notation Guide
56
Generalization
Fig. 3-47, UML Notation Guide
57
Generalization
Fig. 3-48, UML Notation Guide
58
Dependencies
Fig. 3-50, UML Notation Guide
59
Dependencies
Fig. 3-51, UML Notation Guide
60
Derived Attributes and Associations
Fig. 3-52, UML Notation Guide
61
Objects
Fig. 3-38, UML Notation Guide
62
Composite objects
Fig. 3-39, UML Notation Guide
63
Links
Fig. 3-46, UML Notation Guide
64
Constraints and Comments
Fig. 3-17, UML Notation Guide
65
Class Diagram Examples
Adapted from Fig. 23 EJB 2.0.
66
Adapted from Fig. 23 EJB 2.0.
67
Adapted from Fig. 23 EJB 2.0.
68
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com