data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

24
data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case portfolio project Systems Analysis and Design for the Small Enterprise section II Analysis

Upload: bill

Post on 04-Feb-2016

42 views

Category:

Documents


0 download

DESCRIPTION

section II Analysis. for the Small Enterprise. Systems Analysis and Design. data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case portfolio project. Chapter Objectives. When you complete this chapter you will be able to: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

data fundamentalsfile processing fundamentalsentity-relationship diagramsthe cornucopia caseportfolio projectS

yste

ms

An

alys

is a

nd

Des

ign

for

the

Sm

all

En

terp

rise

section IIAnalysis

Page 2: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Chapter Objectives

When you complete this chapter you will be able to:

• Identify data types and structures within a file• Distinguish between master and transaction

files• Define the relationship between two files• Construct and normalize an entity-

relationship diagram

Page 3: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Data Fundamentals

The Data Model:

• Data is organized into data files, which appear as data stores on the DFD

• On a DFD, a data store may actually represent– an independent data file– a data file that is part of a database– a database consisting of several related data files

• The data model provides detailed information on the data stores identified in the DFD

Page 4: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Data Models and the Six CIS Components

Page 5: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Data Fundamentals

Data Definition and Structure:

• Data is defined by three attributes: name, size, and type– Data names provide unique and descriptive labels

– Data size determines the amount of space required to store the data

– Data type specifies how the computer stores the data and restricts how the data can be used

• Data elements are organized into structures– a record is a collection of related data elements or

fields

– a data file is a collection of related records

Page 6: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

File Processing Fundamentals

Data File Types:

• One way to classify files is to consider how file content correlates to events or activities within the enterprise

– A master files is a collection of data that represents an identifiable person or thing

– A transaction file is a collection of data that represents a particular event or activity of the enterprise

Page 7: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Silhouette Sea Charter Files – Part 1

The Charter Contract contains details of individual charters.

The Customer master file contains one record for each customer.

The Charter transaction file contains one record for each charter.

Page 8: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

File Processing Fundamentals

Database Structure:

• A relational database is a collection of data files that are tied together by common fields

• The records in each data file are distinguished from one another by key fields

• A key field may contain a unique value, known as a primary key value.

Page 9: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Figure 4-2: Silhouette Sea Charter Files – Part 2

The Boat master file contains one record for each boat.

The Customer master file contains one record for each customer.

The Charter transaction file contains one record for each charter.

The Captain master file contains one record for each captain.

Page 10: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Figure 4-2: Silhouette Sea Charter Files – Part 3

Registration # is added as a primary key to the Boat master file.

CustID is added as a primary key to the Customer master file record.

CharterID is added as a primary key to the Charter transaction file.

SSN is added as a primary key to the Captain master file.

Page 11: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Entity Relationship Diagrams

• The entity-relationship diagram (ERD) presents the data model

• The data stores of the DFD become the entities of the ERD

• Entities are related to one another when they share a common field

• Cardinality is the term used to describe the nature of the entity relationship, which may be:– one-to-one– one-to-many– many-to-many

Page 12: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Silhouette Sea Charter’s Initial ERD

This many-to-many cardinality reflects the possibility that… A single charter may have many customers… Over time, a customer may take many charters

This one-to-many cardinality reflects the possibility that, over time, a captain may be assigned to many charters

This one-to-many cardinality reflects the possibility that, over time, a boat may be used for many charters

Reference Figure 4-5: Illustrated ERD Symbols and Silhouette Sea Charter

Page 13: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Entity Relationship Diagrams

Many-to-Many Cardinalities:

• Relational database software, such as Microsoft Access, cannot implement many-to-many cardinalities

• Silhouette considers two solutions to the many-to-many problem … both of which create new problems

Page 14: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Silhouette Sea Charter Inefficient File Diagrams

Solving the many-to-many problem this way increases data redundancy

Solving the many-to-many problem this way creates a repeating group

Page 15: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Entity Relationship Diagrams

Normalization:

• Many-to-many cardinalities should be eliminated through a process called normalization

• Silhouette’s ERD can be normalized by adding a new file between Charter and Customer

Page 16: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Figure 4-7: Silhouette Sea Charter Normalized ERD

To maintain the relationship between Charter and Customer, this new intersection file contains two fields: CharterID

CustID

Page 17: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Three Normal Forms

Formal database design theory outlines a process that ensures file efficiency, referred to as normalcy.

•First normal (1NF) eliminates repeating groups

•Second normal form (2NF) requires every field to be dependent on or determined by the key field

•Third normal form (3NF) requires that all of the dependencies be contained within the file

TECHNOTE 4-1

Page 18: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Database AccuracyThinkingCritically

To what extent is the analyst responsible to clean up the errors that may appear in the enterprise’s existing data files before the new database can be implemented?

Page 19: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

The Cornucopia Case

The analysis of the current system continues with the development of the data model.

The analysts start the process with the existing system file descriptions and ERD and then introduce some early modifications and improvements.

Page 20: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Cornucopia Existing Entity Attributes

Customer Supplier Order Inventory

Attribute 1 name name order number UPC

Attribute 2 address supp. phone order date title

Attribute 3 cust. phone Supplier phone artist

Attribute 4 UPC(1) label

Attribute 5 quantity ordered (1) price

Attribute 6 UPC(1)

Attribute 7 quantity ordered (1)

Attribute 8 UPC (1)

Attribute 9 quantity ordered (1)

Page 21: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Cornucopia Existing System ERD

Page 22: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Cornucopia Improved Entity Attributes

Customer Supplier Order Order/

Customer

Inventory

Attribute 1 *cust ID *supp ID *order num *order num *UPC

Attribute 2 first name name order date *UPC title

Attribute 3 last name street supp ID quan ord artist

Attribute 4 street city quan rec label

Attribute 5 city state price

Attribute 6 state zip code quan in stk

Attribute 7 zip code phone supp ID

Attribute 8 phone e-mail

Attribute 9 e-mail fax

Attribute 10 status

Page 23: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case

Cornucopia Normalized ERD

This intersection file is required to normalize the many-to-many relationship between Order and Inventory

Customer is not related to any other file in the existing system ERD

Page 24: data fundamentals file processing fundamentals entity-relationship diagrams the cornucopia case