Systems Analysis and Design Allen Dennis and Barbara Haley

Download Report

Transcript Systems Analysis and Design Allen Dennis and Barbara Haley

Systems Analysis and Design
Alan Dennis, Barbara Haley Wixom, and Roberta Roth
John Wiley & Sons, Inc.
Slides by Candace S. Garrod
Red Rocks Community College
Modified by Yusuf Altunel
To be presented in CSE 440 Systems Analysis and Design
İKU Department of Computer Engineering
7-1
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Data Modeling
Chapter 7
7-2
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Chapter Outline
The Entity Relationship Diagram (ERD)
Reading ERD
Elements of ERD
The Data Dictionary and Metadata
Creating ERD
Building ERD
Advanced Syntax
Validating ERD
Design Guidelines
Normalization
Balancing ERD with DFD
Data Dictionary
Entries
Validation
7-3
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Key Definitions
Data model
A formal way of representing the data
used and created by a business system
Shows data and relationship between
the people,
places
things
Logical data model
shows the organization of data
without indicating
how it is stored, created, or manipulated.
7-4
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Key Definitions
Physical data model
shows how the data will
actually be stored
in databases or files.
Normalization is
the process analysts use
to validate data models.
Data models should balance
with process models
7-5
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
THE ENTITY-RELATIONSHIP
DIAGRAM (ERD)
7-6
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
What Is an ERD?
A picture showing
the information created, stored, and used
by a business system.
Entities generally
represent similar kinds of information
Lines drawn between entities
show relationships among the data
High level business rules are also shown
7-7
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Using the ERD to Show Business Rules
Business rules are
constraints followed
when the system is in operation.
ERD symbols can show
when one instance of an entity
must exist before another instance
A doctor must exist
before appointments for the doctor
7-8
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Using the ERD to Show Business Rules
ERD symbols can show
when one instance of an entity can be related
to only one or many instances of another entity
One doctor can have many patients;
each patient may have only one primary doctor
ERD symbols show
when the existence of an entity instance is optional
for a related entity instance
A patient may or may not have insurance
coverage
7-9
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
An ERD Example
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
ERD Elements
7 - 11
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Entity
A person, place, event, or thing
about which data is collected
For being an entity
must have multiple occurrences
Example:
If an organization has only one warehouse,
the warehouse is not an entity.
However, if there are several warehouses,
the warehouse could be an entity
when the organization wants
to store data about each warehouse instance.
7 - 12
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Entities and Instances
7 - 13
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Attributes
Information captured about an entity
should be included in the model
Only those used by the organization
Attribute names are nouns
Sometimes entity name
is added for clarity
at the beginning of
the attribute name
7 - 14
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Identifiers
One or more attributes
can serve as the entity identifier,
uniquely identifying each entity instance
Concatenated identifier
consists of several attributes
An identifier may be ‘artificial’
such as creating an ID number
Identifiers may not be developed
until the Design Phase
7 - 15
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Choices for Identifiers
7 - 16
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Relationships
Associations between entities
The first entity in the relationship
is the parent entity;
the second entity in the relationship
is the child entity
Relationships should have
active verb names
Relationships go in both directions
7 - 17
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Cardinality
Cardinality
refers to the number of
instances in one entity
can be related to
instances in another entity
One instance in an entity refers to
one and only one instance in the related entity (1:1)
one or more instances in the related entity (1:N)
One or more instances in an entity refer to
one or more instances in the related entity (M:N)
7 - 18
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Modality
Modality
Refers to whether or not
an instance of a child entity can exist
without a related instance in the parent entity
Not Null means that
an instance in the related entity
must exist for an instance
in another entity
Null means that
no instance in the related entity is necessary
for an instance in another entity to be valid
7 - 19
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
M : N Relationships
7 - 20
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
BUILDING AN ENTITYRELATIONSHIP DIAGRAM
(ERD)
7 - 21
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
ERD Basics
Drawing the ERD is
an iterative process
of trial and revision
ERDs can become quite complex
7 - 22
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Steps in Building ERDs
Identify the entities
Add attributes
Assign identifiers
Identify relationships
7 - 23
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Identify the Entities
Identify major categories of information
If available, check the process models for
data stores,
external entities,
and data flows
Check the major inputs and outputs
from the use cases
Verify that
there is more than one instance of the entity
that occurs in the system
7 - 24
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Add Attributes and Assign Identifiers
Identify entity attributes
relevant to the system to be developed
Check the process model repository entries
for details on data flows and data stores
Check the data requirements
of the requirements definition
Interview knowledgeable users
Perform document analysis
on existing forms and reports
Select the entity’s identifier
7 - 25
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Identify Relationships
Start with an entity
and identify all entities
with which it shares relationships
Describe the relationship
with the appropriate verb phrase
Determine the cardinality and modality
by discussing the business rules
with knowledgeable users
7 - 26
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
ERD Building Tips
Data stores of the DFD
should correspond to entities
Only include entities
with more than one instance of
information
Don’t include entities
associated with system implementation
they will be added later
7 - 27
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Advanced Syntax
Independent Entity
Can exist without the help of another entity
Examples
Patient, Doctor, Insurance Company
Identifiers created
from the entity’s own attributes
Dependent Entity
Child entity requires
attributes from parent entity
to uniquely identify an instance
Identifier
Contains at least one attribute from parent entity
7 - 28
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Advanced Syntax
Intersection Entity
Exists to capture some information
about the relationship
exists between two other entities.
Typically, intersection entities
are added to a data model
to store information
about two entities sharing an M : N relationship.
7 - 29
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Advanced Syntax – Resolving an M : N
Relationship
7 - 30
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
VALIDATING AN ERD
7 - 31
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Design Modeling Guidelines Summary
7 - 32
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Normalization
Normalization is
technique used
to validate data models
Series of rules applied
to the logical data model
to improve its organization
7 - 33
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Normalization Steps
7 - 34
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Unnormalized Entity
Begin with an entity from
the logical data model
7 - 35
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
First Normal Form (1NF)
Look for repeating groups of attributes
and remove them into separate entities
7 - 36
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Second Normal Form (2NF)
If an entity has a concatenated identifier:
look for attributes
that depend only on part of the identifier.
If found, remove to new entity.
7 - 37
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Third Normal Form (3NF)
Look for attributes
that depend only on
another non-identifier attribute.
If found, remove to new entity.
Also remove any calculated attributes.
7 - 38
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Partial Process Model and CRUD Matrix
7 - 39
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Balancing ERDs with DFDs
All analysis activities are interrelated
Process models contain two data components
Data flows and data stores
The DFD data components need to balance
the ERD’s data stores (entities)
and data elements (attributes)
Many CASE tools provide
features to check for imbalance
7 - 40
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Balancing ERDs with DFDs
Check all data stores
and elements correspond between models
Data that is not used is unnecessary
Data that has been omitted
results in an incomplete system
Do not follow thoughtlessly
check that the models make sense!
7 - 41
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
The Data Dictionary and Metadata
Metadata is information stored
about components of the data model
Metadata is stored
in the data dictionary
so it can be shared by developers
and users throughout the SDLC
A complete, shareable data dictionary
Helps to improve the quality of the system
7 - 42
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Reasons for Using a Data Dictionary
Provide documentation
Eliminate redundancy
Validate the data flow diagram
Provide a starting point
for developing screens and reports
To develop the logic for DFD
processes
Kendall & Kendall
10-43
Data Dictionary Contents
Data dictionaries contain
DFD Elements
Data flow
Data structures
Data Elements
Data stores
ERD elements
Entity
Attribute
Relationship
10-44
Kendall & Kendall
Defining Data Flow
The source of the data flow: could be
an external entity,
a process,
or a data flow coming from a data store
The destination of the data flow
Type of data flow, either
A record entering or leaving a file
Containing a report, form, or screen
Internal - used between processes
The name of the data structure or elements
The volume per unit time:
records per day or
any other unit of time
An area
for further comments
and notations about the data flow
Kendall & Kendall
10-45
Data Flow Example
10-46
Kendall & Kendall
Defining Data Structures
Data structures are
a group of smaller structures and elements
An algebraic notation is used
to represent the data structure
The symbols used are
Equal sign ‘=‘,
meaning “consists of”
Plus sign ‘+’,
meaning "and”
Braces ‘{}’
meaning repetitive elements,
a repeating element or group of elements
Brackets ‘[]’
for an either/or situation
The elements listed inside are mutually exclusive
Parentheses
‘()’ for an optional element
10-47
Kendall & Kendall
Data Structure Example
Customer Order =Customer Number +
Customer Name +
Address +
Telephone +
Catalog Number +
Order Date +
{Order Items} +
Merchandise Total +
(Tax) +
Shipping and Handling +
Order Total +
Method of Payment +
(Credit Card Info)
Customer Name =
Address =
Telephone =
Credit Card Info=
First Name +
(Middle Initial) +
Last Name
Street +
(Apartment) +
City +
State +
Zip +
(Zip Expansion) +
(Country)
Area code +
Local number
Credit Card Type +
Name on Card +
Credit Card Number +
Expiration Date
10-48
Kendall & Kendall
DFD & Data Dictionary
Employee Record
Employee Number +
Personeal Info +
Wage Information+
Current Pay Info+
Year-To-Date Info
Timefile Record
Employee Number+
Employee name+
Hours Worked
Employee Paycheck
Wage Information
Rate of Pay+
Number of Dependents
Employee Number +
Employee Name+
Address+
Current Pay Amount+
Year-To-Date figures
Current Pay Amount
Gross Pay+
Federal Witholding+
State Witholding+
Social Security Witholding+
Net Pay
Kendall & Kendall
10-49
Defining Elements
Data elements should be defined
with
descriptive information,
length and type of data information,
validation criteria,
and default values
Each element should be
defined once in the data dictionary
10-50
Kendall & Kendall
Defining Elements-1
Element ID.
optional entry allows the analyst
to build automated data dictionary entries
The name of the element,
descriptive and unique
what the element is commonly called
in most programs
or by the major user of the element
Aliases,
are synonyms
or other names for the element
are names used by different users
within different systems
Example,
a Customer Number may be called a
Receivable Account Number
Client Number
A short description of the element
Kendall & Kendall
10-51
Defining Elements-2
Whether the element is base or derived
A base element is
initially keyed into the system
A derived element is
created by a process,
usually as the result of a calculation
or some logic
The length of an element
the stored length of the item
screen or printed lengths may be different!
The type of data,
numeric,
date,
alphabetic
alphanumeric
other microcomputer formats
Validation criteria must be defined
Discrete: Monday, Tuesday,…
Continuous: [1..200]
Default Values
displayed on entry screens
reduces the amount of keying
additional comment or remarks
7 - 52
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Data Element Description Form
10-53
Kendall & Kendall
Defining Data Stores
Data stores contain
a minimal of all base elements
as well as many derived elements
Data stores are created for each different data entity:
each different person,
place,
or thing being stored
Data flow base elements
are grouped together
and a data store is created
for each unique group
to arrive at a complete data store description
you may have to examine
many different data flow structures
Since a data flow may only show
part of the collective data,
called the user view,
10-54
Kendall & Kendall
Data Store Definition
The Data Store ID
The Data Store Name,
descriptive and unique
An Alias for the file
A short description of the data store
The file type: manual or computerized
If the file is computerized,
is it a database file or a flat file
The maximum and average number of records on the file
The growth per year
to predict the amount of disk space required
The data set name specifies
the table or file name, if known
The data structure should use
a name found in the data dictionary
Primary and secondary keys
Example: Customer Master File
Customer Number
is the primary key
should be unique
secondary keys :
The Customer Name, Telephone, and Zip Code
10-55
Kendall & Kendall
Data Store Definition Form
10-56
Kendall & Kendall
Data Dictionary Entry for the Patient Entity
7 - 57
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Data Dictionary Entries for ERD
7 - 58
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
CASE Entry for Patient ID
7 - 59
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
CASE Entry for Relationship
7 - 60
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Creating Reports, Screens, Forms
To create screens, reports, and forms
Use the element definitions to create fields
Arrange the fields in
an aesthetically pleasing
screen,
form,
or report,
using design guidelines and common sense
Repeating groups become columns
Structural records are grouped
together on the screen, report, or form
10-61
Kendall & Kendall
Summary
The ERD is the most common technique for
drawing data models. The building blocks of the
ERD are:
Entities describe people, places, or things
Attributes capture information about the entity
Relationships associate data across entities
Intersection, dependent, and independent entities
must be recognized.
The ERD must be balanced with the DFD.
7 - 62
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.
Copyright © 2006
John Wiley & Sons, Inc.
All rights reserved. Reproduction or translation of this
work beyond that permitted in Section 117 of the 1976
United States Copyright Act without the express written
permission of the copyright owner is unlawful.
Request for further information should be addressed to
the Permissions Department, John Wiley & Sons, Inc.
The purchaser may make back-up copies for his/her
own use only and not for redistribution or resale.
The Publisher assumes no responsibility for errors,
omissions, or damages, caused by the use of these
programs or from the use of the information contained
herein.
7 - 63
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition
Copyright 2006 © John Wiley & Sons, Inc. All rights reserved.
.