13
© ESI International BAP:DWL:EN:000 ver. 2.0 Module 4 4-1 Logical Data Models © ESI International BAP:DWL:EN:000 ver. 2.0 Module 4 4-2 Objectives By the end of this module, you will be able to— Describe how a logical data model is an extension of a conceptual data model Explain the concepts of generalization and specialization through supertyping and subtyping Explain the requirements for special treatment of a multivalued attribute Module 4: Logical Data Models © ESI International BAP:DWL:EN:000 ver. 2.0 45

Logical Data Models

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-1

Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-2

Objectives

By the end of this module, you will be able to—Describe how a logical data model is an extension of a conceptualdata modelExplain the concepts of generalization and specialization throughsupertyping and subtypingExplain the requirements for special treatment of a multivaluedattribute

Module 4: Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0 45

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-3

The Logical Data Model

Is an extension of the conceptual data modelIs a completely detailed data model, including all entities, attributes,relationships, and unique identifiersMust be normalized fully to third normal form (normalization will becovered later in the course)May be used as a deliverable to a database designer

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-4

Introduction to Entity Types

FundamentalProvides data that is basic to the business and notdependent on any other entity

Supertype/SubtypeDivides entities into classifications

Attributive or dependentDepends on another entity for its existence

AssociativeDescribes the relationship between 2 other entities

Module 4: Logical Data Models

46 BAP:DWL:EN:000 ver. 2.0 © ESI International

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-5

Supertype and Subtype Entities

These entities show generalization and specialization.These entities may be split into 2 or more mutually exclusivesubtypes.

Each has a common attribute or relationship.A subtype entity implicitly inherits all the attributes and relationshipsof the supertype.

ALL subtypes must have the same unique identifier as thesupertype.

Subtypes for an entity must comprise a complete set.Each subtype must contain either—

Its own special attributes ORIts own special relationships to other entities, although it maycontain both

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-6

Supertype/Subtype Example

Module 4: Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0 47

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-7

Typical Reasons for Subtyping

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-8

The Employee Subtypes

Module 4: Logical Data Models

48 BAP:DWL:EN:000 ver. 2.0 © ESI International

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-9

Bottom-Up Subtyping

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-10

Creativity with Subtyping

Some benefit (flexibility, extendibility, reusability) may be derivedfrom showing different levels of generalization and specialization.

A possible generalization of EMPLOYEE, INSURED, PROVIDER,and any other types of individuals or organizations that were previously

considered as separate entities

Module 4: Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0 49

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-11

Levels of Subtyping

Multiple levels of subtyping may be required.

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-12

Subtype Inheritance

NOTE: The relationship to benefits is NOT shared across all subtypes butonly applies to FULL-TIME EMPLOYEE.

Module 4: Logical Data Models

50 BAP:DWL:EN:000 ver. 2.0 © ESI International

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-13

Subtype Discriminators

Every supertype must be associated with or contain a subtypediscriminator.A subtype discriminator is an attribute that allows an occurrence ofthe supertype to be classified as an occurrence of a subtype.

In the example above, the attribute Employee Type is the subtypediscriminator.

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-14

Exercise 4-1

Identifying Subtypes and Supertypes

Module 4: Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0 51

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-15

Exercise 4-2

Identifying Subtypes and Supertypes in theConceptual Data Model (Optional)

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-16

Attributive Entities and Multivalued Attributes

An attributive entity depends on another entity for its existence andfurther describes the entity on which it depends.Attributive entities are often discovered by identifying multivaluedattributes or when an attribute is not fully depended on the uniqueidentifier.Multivalued attributes must always be removed to a new entitywhere they have only a single value.

Module 4: Logical Data Models

52 BAP:DWL:EN:000 ver. 2.0 © ESI International

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-17

Multivalued Attribute Example

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-18

Attributive Entity Example

EMPLOYEE PHONE is dependent on EMPLOYEE (if there wereno employees, there would be no employee phones)EMPLOYEE PHONE describes EMPLOYEE (by documenting theemployees’ phone numbers)

Module 4: Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0 53

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-19

Attributive Entity Example (continued)

First, the multivalued attributes, Skill Code and Skill Level, must bemoved to a new entity:

Next, the new entity must be named and its unique identifierassigned (see next slide).

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-20

Attributive Entity Example (continued)

To name the new entity, we can take the name of the originalentity, plus the name of the moved attribute group—EMPLOYEESKILL:

As a unique identifier for the new entity, we will take EmployeeNumber from EMPLOYEE and make Skill Code a component of the(concatenated) unique identifier:

Module 4: Logical Data Models

54 BAP:DWL:EN:000 ver. 2.0 © ESI International

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-21

A Nondependence Example

Attributive entities also may be discovered when an attribute is notdependent on the unique identifier of its entity.

The Computer Description attribute is not dependent on the uniqueidentifier Employee Number.It is really dependent on the Computer ID attribute.

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-22

A Nondependence Example (continued)

The example shown on the previous page would be resolved as follows:

Module 4: Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0 55

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-23

Creating an Attributive Entity

Move the multivalued attribute (or group of related attributes) to anew entity.Name the new entity.Define a unique identifier.Show the relationship and its cardinality.

Tool: Checklist for Creating an Attributive Entity

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-24

Exercise 4-3

Creating Attributive Entities

Module 4: Logical Data Models

56 BAP:DWL:EN:000 ver. 2.0 © ESI International

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-25

Key Messages

A logical data model is an extension of a conceptual data model.Subtype and supertype entities allow similarities and differences tobe more precisely modeled.Multivalued attributes must always be removed to a new entitywhere they only have a single value.

© ESI International BAP:DWL:EN:000 ver. 2.0

Module 4

4-26

Next Steps: Action Plan

How can you apply what you learned in this module to your workenvironment?

Turn to the Action Plan tab and find the worksheet for this module.Using the questions provided in Questions to Consider, develop alist of actions you will complete when you return to work.For each action (what), identify—

Who needs to be involvedWhen you anticipate completing the action

Module 4: Logical Data Models

© ESI International BAP:DWL:EN:000 ver. 2.0 57