Top Banner
TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258
21

TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

Jan 13, 2016

Download

Documents

Justin Walsh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 1Dr. Chen, Business Database Systems

Data Modeling

Professor Chen

School of Business Administration

Gonzaga University

Spokane, WA 99258

Page 2: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

A Relationship Between the Organization and the DataBase

Organization1. Hardware2. Software3. Data4. Procedures5. People

PictureOr

Model

OldState

Events

NewState

Activities

DataBaseManagement

Systems D.B.

Transactions

(Add, modify, delete, …)

Correspond with the processing of the events

Information must be:1. Timely, 2. Accurate, relevant, and verifiable.3. Presented in a useable form.

User

Page 3: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 3Dr. Chen, Business Database Systems

Data Modeling

• The data model is a cornerstone for every information system, because it describes the entities that the system will create and maintain during its lifetime.

Page 4: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

MODELING ENTERPERISE DATA

Enterprise ViewEnterprise View

ConceptualData Models

Business Needs

Logical Models

Physical Models

ProductionSystem

Congruent

Satis

fy

Coporatestrategies/goals etc.

Implement

Maintenance

Page 5: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 5Dr. Chen, Business Database Systems

Data Modeling (Cont.)

• Building the data model is probably the most important activity during requirements definition, because in the process of understanding how the data is organized and identifying the relationships that exist between entities, you can discover most of the functionality that the system will satisfy.

Page 6: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 6Dr. Chen, Business Database Systems

Business Area of Data Model

• The data model of a business area tends to be relatively stable, compared, for example, to the set of operational procedures or organizational structure, which changes frequently.

• Therefore, basing the implementation of the future system upon a well-defined data model is a good first step towards developing a system that meets the real requirements of the users.

Page 7: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 7Dr. Chen, Business Database Systems

Techniques and Approaches

• Two techniques are used interchangeably to model the data of a system:– Entity relationship model (E-R/M)– Data normalization

Page 8: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 8Dr. Chen, Business Database Systems

E-R/M and Normalization

• E-R/M (and EE-R/M) aims at identifying the entities that are part of the system, the attributes that make up these entities, and the dependencies between entities.

• Normalization makes the data model created using the E-R more robust and extends the life of systems based on the model.

Page 9: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 9Dr. Chen, Business Database Systems

E-R and Normalization (Cont.)

• These two techniques go hand in hand and should be applied conscientiously during data modeling activities.

Page 10: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 10Dr. Chen, Business Database Systems

Approaches to Data Modeling

• Two approaches to data modeling: Top-down Bottom-up

Page 11: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 11Dr. Chen, Business Database Systems

Top-Down vs. Bottom-Up Approach

Identify Entities

Discover Relationship

Define Attributes

Identify Entities

Discover Relationship

Define Attributes

Collect Data

Analyze/synthesize Data

TOP-DOWNBottom-Up

Page 12: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 12Dr. Chen, Business Database Systems

Top-Down vs. Bottom-Up Approach

Identify Entities

Discover Relationship

Define Attributes

Identify Entities

Discover Relationship

Define Attributes

Collect Data

Analyze/synthesize Data

TOP-DOWNBottom-Up

Page 13: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 13Dr. Chen, Business Database Systems

Why Normalization?

• Remove the anomalies due to– lack of flexibility – ineffectiveness of data storage– inefficiency of data manipulation operations

inserts (additions)deletes (deletion)updates (modification)

Page 14: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 14Dr. Chen, Business Database Systems

Denormalization and Why?

• Denormalization is the process of transforming normalized relations into unnormalized physical record specifications.

• A normalized form (e.g., 3NF) presents many important features, however, it may required that queries join terms from different entities more often than in a less normalized data model.

Page 15: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 15Dr. Chen, Business Database Systems

An example of Denormalization

CUSTOMER

... CITY STATE ZIPCustID

CITYZIP STATEZIP

?Normalization NO!

STATEZIP CITY

Page 16: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 16Dr. Chen, Business Database Systems

Denormalization : CUSTOMER

• In a denormalized version of the CUSTOMER entity, ZIP, CITY, and STATE may be defined as attributes of the entity whose value is derived from entity ZIP and stored redundantly with the other address properties of each CUSTOMER.

Page 17: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 17Dr. Chen, Business Database Systems

New Business Rules

• To maintain the data consistency, new business rules should be implemented:the values of attributes CITY and STATE will

be updated only in the entity ZIP. In all other entities where these attributes are denormalized, applications may insert and select but not modify these attributes.

Page 18: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 18Dr. Chen, Business Database Systems

New Business Rules (cont.)

when the attributes CITY and STATE of entity ZIP are modified, the changes will be propagated in all the denormalized CITY and STATE attributes of other entities.

Page 19: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 19Dr. Chen, Business Database Systems

Un-normalization vs. De-normalization

• Unnormalized data model is little or no analysis is performed.

• Denormalized data model is derived from a model in the 3NF, after the reasons and impact of denormalizing some entities are identified and weighed.

Page 20: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 20Dr. Chen, Business Database Systems

Conclusion

• When parts of the data model are denormalized, the rules for maintaining the redundant data must be defined clearly and implemented programmatically, in order to avoid the anomalies discussed before.

Page 21: TM 1 Dr. Chen, Business Database Systems Data Modeling Professor Chen School of Business Administration Gonzaga University Spokane, WA 99258.

TM 21Dr. Chen, Business Database Systems

Are you still ...