37
Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Fundamentals, Design, and Implementation, 9/e

COS 346

Day 3

Page 2: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/2 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Agenda

Questions from last Class? Assignment 31 Graded

– 2 A’s, 1 B, 1 C, 2 F’s and 1 non-submit– Some of you need to take these assignments more seriously

Assignment #2 Due next class Assignment # 3 will be assigned next class First Exam

– Feb2 one week from today– Chaps 1-3– 20 M/C; 5 Short essays– 60 min WebCt

Today’s discussion– Entity-Relationship Data Modeling:

Process and Examples

Page 3: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Fundamentals, Design, and Implementation, 9/e

Chapter 3Entity-Relationship Data Modeling: Process and Examples

Page 4: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/4 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Quick review of E-R

Page 5: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/5 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Quick review of IDEF1X

FISH OBSERVATION RIVER

OBSERVER CLASS

CLASS_OFFERINGPROFESSIONAL VOLUNTEER

RIVER_SITEP

Question 2.76 on page 69 of text

Page 6: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/6 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

A Data Modeling Process

Steps in the data modeling process1. Plan project2. Determine requirements3. Specify entities4. Specify relationships5. Determine identifiers6. Specify attributes7. Specify domains8. Validate model

Page 7: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/7 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Planning the Project

Obtaining project authorization and budget

Building the project team Planning the team’s activities Establishing tools, techniques, and

standards for consistent results Defining the project’s scope

Page 8: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/8 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Determining System Requirements Sources for data modeling requirements

– User interviews and user activity observations– Existing forms and reports– New forms and reports– Existing manual files– Existing computer files/databases– Formally defined interfaces (XML)– Domain expertise

The result of the requirements determination will be a repository of notes, diagram, forms reports, files, etc., that can be used to develop the data model

Page 9: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/9 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Specifying Entities

An entity is something that the users want to track; something the users want to keep data about

Entities – can be physical things or logical concepts– are identifiable; you can tell one from another– are things described by nouns, not

characteristics described by adjectives

Page 10: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/10 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Specifying entities

Page 11: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/11 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Specifying Relationships

Includes:– Identity of the parent and child entities– Relationship type– Minimum and maximum cardinalities– Name of the relationships

Two techniques:– Examine whether a relationship exists between every

combination of two entities – Locate relationships from requirement documents

A combination of the two approaches may be used Be careful of combinatorial explosions

– 5 entities -> 20 possible relationships to explore– 10 entities -> 90 possible relationships to explore– 100 entities -> 9900 possible relationships to explore

Page 12: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/12 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Specifying Relationships

Page 13: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/13 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Determining Identifiers

Identifier is an attribute or group of attributes that uniquely identifies an entity instance

If there is difficulty specifying an identifier, maybe: – it should be part of a different entity– it is a subtype or category of a common entity– it needs one or more identifying relationships

Page 14: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/14 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Specifying Attributes and Domains Find attributes on forms, reports, existing files, etc., and add

them to entities Determine whether the attribute has already defined a

domain– If so, the attribute is based upon that domain– If not, a new domain is defined

Review the domains and make adjustments as necessary Domain property inheritance: when the domain properties

change, all the attribute properties change as well Domains may be used to enforce data standards promoting

compatible data types and systems Once all attributes have been specified the model should be

reviewed for missing entities

Page 15: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/15 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Validating Model

Data model is a model of humans’ models, not a model of reality

A data model is wrong if it does not accurately reflect the ways the users think about their world

Data models are validated through a series of reviews – Normally, a team review is followed by user reviews

E-R model as well as prototypes of forms and reports may be used to communicate to users features of the data model

Page 16: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/16 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Creating Data Models From Forms and Reports Example:

Single entities

Page 17: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/17 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Identifying Connection Relationships

Cardinality? P, 1, Z

Page 18: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/18 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Repeating Groups

Page 19: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/19 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Repeating Groups

Page 20: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/20 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Nested Groups

Page 21: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/21 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Non-Identifying Connection Relationships Example: 1:1

Page 22: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/22 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Non-Identifying Connection Relationships

Page 23: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/23 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: 1:N

Page 24: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/24 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: 1:N

Page 25: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/25 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: 1:N

Page 26: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/26 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: N:M

Insert

Page 27: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/27 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Assignment Relationship

Page 28: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/28 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Assignment Relationship

Page 29: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/29 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Category Relationship

Page 30: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/30 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Category Relationship

Page 31: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/31 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Category Relationship

Page 32: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/32 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Sales-Order Model

Page 33: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/33 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Sales Order

Page 34: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/34 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: Sales Order

Figure 3-16(c) shows an alternative design that allows an item to appear more than once on a given order

Page 35: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/35 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

Example: University System

Page 36: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Chapter 3/36 Copyright © 2004

Database Processing: Fundamentals, Design and Implementation, 9/e by David M. Kroenke

University System With Domain Names

Page 37: Fundamentals, Design, and Implementation, 9/e COS 346 Day 3

Fundamentals, Design, and Implementation, 9/e

Chapter 3Entity-Relationship Data Modeling: Process and Examples