0% found this document useful (0 votes)
6 views

Conger new engineering

The document discusses data-oriented analysis in software engineering, emphasizing the stability of data compared to processes. It outlines the Information Engineering (IE) methodology, which includes phases such as enterprise analysis, business area analysis, and business system design. The chapter also defines key concepts and terms related to business area analysis, including data modeling and normalization, and highlights the importance of understanding data relationships and structures.

Uploaded by

okorochika641
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Conger new engineering

The document discusses data-oriented analysis in software engineering, emphasizing the stability of data compared to processes. It outlines the Information Engineering (IE) methodology, which includes phases such as enterprise analysis, business area analysis, and business system design. The chapter also defines key concepts and terms related to business area analysis, including data modeling and normalization, and highlights the importance of understanding data relationships and structures.

Uploaded by

okorochika641
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

The New Software Engineering

This book is licensed under a Creative Commons Attribution 3.0 License

The New Software


Engineering

Sue Conger

Copyright © 2008 by Sue Conger

For any questions about this text, please email: [email protected]

The Global Text Project is funded by the Jacobs Foundation, Zurich, Switzerland

This book is licensed under a Creative Commons Attribution 3.0 License

This edition was scanned and converted to text using Optical Character Recognition. We are in the process of
converting this edition into the Global Text Project standard format. When this is complete, a new edition will be
posted on the Global Text Project website and will be available in a variety of formats upon request.

The New Software Engineering 2 A Global Text


CHAPTER9

DATA-
-----------------------------. --.
ORIENTED
ANALYSIS --------------------------.---------

INTRODUCTION _ enterprise level (see Chapter 5). Data and functional


architectures are defined further during business area
Unlike process orientation, data-oriented analysis is analysis, then are divided into application areas and
not the result of the vision of a small set of people. prioritized. Therefore, multiple application areas can
Rather, it is the collective wisdom of many sources: result from one or more business areas.
computer vendors, MIS researchers, and consul- IE methodology defines activities from the strate-
tants. The philosophy that underlies the data- gic organizational level through to implementation
oriented approach is that data are stable and more of individual applications. The major phases of in-
unchanging than processes. Processes can be revised formation engineering are:
with every reorganization. Data entities, on the other
1. Enterprise Analysis
hand, rarely change in the lifetime of a business.
2. Business Area Analysis
Attributes of entities also rarely change. Even
3. Business System Design
though the values of data do change constantly, the
4. Construction
structure of the data does not. If data are stable, then
5. Maintenance
they should be examined closely and first.
Data-oriented methodologies teach that data In this chapter we discuss the Business Area Analy-
redundancy is to be minimized to best manage it in sis (BAA) component of information engineering,
an organization. Database management software is which contains the activities that are most similar to
assumed, but not required, in this approach. Data analysis in other methodologies. IE analysis is called
administration, that is, the conscious manage- Business Area Analysis (BAA), rather than just
ment of data as a resource of the business, is also analysis, because the focus is on business data and
assumed. functions required to do the work. A departure from
Information engineering (IE) is the methodology process-oriented analysis is that information engi-
we use to discuss data-oriented analysis. IE teaches neering specifically ignores the current business or-
that to know which data should be the focus, we ganization, applications, and procedures. IE focuses
need architectures of data, business functions, and on how the business should work, rather than on how
even organizational technology to guide the process. it does work. Reengineering of the organization and
Architectures are conceptual descriptions of the its applications are common adjunct activities to
items they define. Architectures are developed at the information engineering (see Chapter 5). In the next

328
Definition of Business Area Analysis Terms 329

section, we describe the conceptual foundations processing with 'set' processing. Record processing
of data-oriented analysis. Then, the terminology of constrains languages and applications to one-at-a-
business area analysis is defined. This is followed time record read-manipulate-write processing
by the rules and examples of how to conduct actions even though most records receive identical
each activity. treatment in programs. By specifying the rules for
processing once and applying those rules to the set of
data records, or tuples as they are called in relational
theory, the individual program no longer does any
CONCEPTUAL --------- read-write processing-it is performed by the
DBMS. Applying set theory, the result of any oper-
FOUNDATIONS ---------- ation is always a set. Thus, using mathematically
Data-oriented analysis is based mainly on theories based rules, the results of database processing can be
about data. Process activities are based on the same known in advance and are provable.
systems theory which was the basis for the process Process activities performed are attributed to con-
development paradigm of Chapters 7 and 8. sulting practices that work and build on the systems
The data-related theories are semantic informa- theory underlying the process development para-
tion theory and relational database theory. Semantic digm. Some problems with DFDs are:
information theory seeks to understand the meaning ■ DFDs do not accommodate time.
behind the data in applications and is most obvious ■ DFDs have no implied sequence to
in the depiction of meaning underlying entity rela- processing.
tionship diagrams. By understanding the entities, or ■ DFDs assign media to data early in analysis
things, in the application, we know more about their without any real deliberation.
domains-the allowable sets of values they may
take. Eventually, rules about domain matching and These problems are eliminated in process data
entity integrity are applied to include domain pro- flow diagrams (PDFDs) that are built during IE
cessing along with data processing of the individual analysis. Process methods of decomposition rely on
attributes of entities. Relationships between entities analyst experience in process orientation. Data meth-
are as important as entities and domains. By know- ods, such as information engineering (IE), provide a
ing allowable business relationships, we can con- business-oriented approach to defining processes.
strain processing naturally, by applying business Structured process constructs-selection, iteration,
rules, without regard to organizatiortal design. Rela- and sequence-are not consciously considered in
tionship cardinality, or number, is important to process methods until structured design. Structured
knowing how many of each related item should be constructs are used in IE analysis to describe process
evaluated. Cardinality prescribes either individual relationships.
entity instances or sets of instances for processing.
By knowing more about the meaning underlying the
data in an application, constraints can be automated DEFINITION OF ----------
and made more general, thus, simplifying the appli- BUSINESS AREA ---------
cation development process.
Relational database theory is based on mathe- ANALYSIS TERMS _
matical set theory (or relational calculus) which The tasks performed during business area analysis
describes allowable operations on sets of data items. (BAA) are:
Relational theory was developed to support provably
correct processing of data items, something that can- 1. Data modeling
not be guaranteed by either hierarchic or network 2. Data analysis
database architectures. Set theory is the basis for re- 3. Functional decomposition (i.e., process
lational theory which replaces the notion of 'record' modeling)
330 CHAPTER 9 Data-Oriented Analysis

4. Process dependency analysis concept, application, or event from the real world
5. Process data flow diagramming about which we want to maintain data (see Figure
6. Process/data interaction mapping and 9-1). There are three kinds of entities: fundamental,
analysis attributive, and associative. A fundamental entity,
for instance, an order, is independent of all other
Throughout the analysis, a data dictionary or repos-
entities and can be defined without thinking about
itory is assumed to be used for documentation. The
other entities. An attributive entity is an entity
final step of BAA is completion of the repository
whose existence depends on the presence of a fun-
for all information found during analysis.
damental entity. If order is the fundamental entity,
For data modeling, the two major activities are
then order item would be an attributive entity related
the creation and refinement of an entity-relationship
to order (see Figure 9-2). Technically, you wouldn't
diagram (ERD) and entity structure analysis, along
have an order without any items, but you cannot
with an accompanying repository. When complete,
have an order item without an order. Attributive
the ERD describes the normalized data environment
entities contain repeating information relating to a
and data scope of the application. Each part of an
fundamental entity. An associative entity is used to
ERD requires definition. An entity type (shortened
simplify and define complex relationships between
to entity in this discussion)1 is some person, object,
entities. All entities are drawn on the entity relation-
ship diagram (ERD) as rectangles.2
1 Technically, a customer is an entity who is uniquely described
by a set of attributes. The set of all customers describes an
entity type which is described by having the same attri- 2 One method of diagramming is to show relationships with a
butes. A specific entity, e.g., customer 'Wells,' is an entity diamond bisecting the line connecting entities. An associative
instance. In this text we use entity to be synonymous with entity, promoting a many-to-many relationship, is drawn as a
entity type. rectangle with the diamond inside.

EXAMPLES

Entity Type Insurance ABC Video Manufacturing

Person Policyholder Customer Customer

Object Policy Video Bill of Lading

Concept Policyholder Services Accounting Department Order

Event Purchase of Policy Rental of Video Shipment of Goods

Organization State Bureau of Insurance Vendor IRS, OSHA

FIGURE 9-1 Entity Type Examples

Entity ABC Video Human Resources Manufacturing

Fundamental Customer Employee Work Order

Attributive Customer Rental History Employee Work History Work Order Detail Items

Associative Vendor-Video Employee-Job History Work Order Item-Finished Part

FIGURE 9-2 Entity Examples


Definition of Business Area Analysis Terms 331

Number Education Examples Manufacturing Examples

One-to-One 1:1 Student to Transcript Work Order Detail Item to


Machine/Day/Time Operator
Course Section to
Room/Day/Time

One-to-Many 1:N Course to Section Work Order to Work Order


Detail Item
Transcript to Course

Course to Room/Day/Time Customer Order to Work Order

Students to Major Salesman to Customer

Advisor to Student

Many-to-Many N:M Student to Course Part to Work Order Detail Item

Professor to Course Vendor to Inventory Part

Professor to Section

FIGURE 9-3 Relationship Cardinality Examples

A relationship is a mutual association between attributive entities. For an m:n relationship, the rela-
two or more entities. It is shown as a line connect- tionship is promoted to create an associative entity.
ing the entities. A relationship has cardinality, or A synonym for associative entity is relationship
the number of the relationship. Cardinalities may be entity. The cardinalities of m:n are reversed to create
one-to-one, one-to-many, or many-to-many (see Fig- two 1:m relationships (see Figure 9-4).
ure 9-3). Cardinality is shown on a diagram by The tabular method is recommended when data
crows' feet to indicate a 'many' relationship and a and relationships are not clearly specified. The tab-
single line to indicate a singular relationship. ular method forces explicit definition of all attributes
Refinement of the ERD has two activities: attri- and their relationships. When these dependencies are
butes are defined, and the ERD is normalized. removed, each relation's data are fully, functionally
Attributes are named properties or characteristics of dependent on the primary keys. An example is
an entity which take on values. We use the terms shown in Figure 9-5. By removing repeating infor-
attribute, field, or data item, as synonyms. An in- mation (first normal form), we create attributive
stance is one occurrence of an attribute or relation. entities (for 1:n relationships) and associative enti-
For example, an instance of the attribute customer- ties (for m:n relationships). In Figure 9-5, we create
ID is the number 2922951. the items from a purchase order as an attributive
Normalization is the refinement of data relation- entity. By removing partial key (second normal
ships to remove repeating information, partial key form), and nonkey (third normal form) dependen-
dependencies, and nonkey dependencies. Normal- cies, we create new fundamental entities. In the
ization can be directly applied to the ERD or can example, the new fundamental entities relate to
use a tabular method of data analysis. The direct items and vendors.
method proceeds by examination of the relation- Upon completion of data modeling, entity struc-
ship cardinalities and the attributes of entities. For ture analysis is performed to determine whether
1:n relationships, and for entities with repetitive a class structure applies. This analysis evaluates
information in the entity, we create (or validate) each entity to determine if the same processes and
332 CHAPTER 9 Data-Oriented Analysis

Before:

Fundamental Entity Fundamental Entity

After:
Associative Entity

Created by promoting
Fundamental Entity the NB relationship Fundamental Entity

A A/B B
V

Attributive Entity
/1\
Created to
accommodate B's B/C
repeating
information

FIGURE 9-4 Direct Normalization of ERD

attributes apply to all entities of a given type. If con- included are for banking, retail, governments,
tingent data usage applies, then classes are defined schools, and manufacturing. Other functions are
and a data hierarchy depicting the structure is general, like Finance, which every organization has.
developed.
Next, business functions are identified as a pre- Accounting Funds Management
lude to process modeling. A business function is a Alumni Affairs Funds Transfer
group of activities that accomplish some complete Audit Health and Hospitals
job that is within the mission of the enterprise. Busi- Community Programs Services
ness functions are ongoing and are not related to Control and Human Resources
organization structure. Functions describe what Measurement Administration
is done in the organization from a high level of Customer Relations Information Systems
abstraction. Business function analysis is usually Data Administration Judicial Management
performed at the enterprise level, but can be the first Distribution Legal Services
activity of process modeling, if required. Represen- Engineering Support Management
tative or generic functions that may be present in a Facilities, Equipment, Manufacturing
business are listed below. Some of the functions are and Supplies Marketing
specializations, for instance, public protection is usu- Administration Material Acquisition
ally a government function. Specialized functions Finance (Purchasing)
Definition of Business Area Analysis Terms 333

Unnormalized First Normal Form Second Normal Form Third Normal Form Relation Name*

Purchase Order Purchase Order

(PO) Number PO Number PO Number

PO Date PO Date PO Date


PO Vendor ID PO Vendor ID PO Vendor ID
PO Vendor Name PO Vendor Name
PO Vendor Address PO Vendor Address ►
PO Ship Terms PO Ship Terms PO Vendor
PO Vendor ID
PO Payment Terms PO Payment Terms PO Vendor Name
*PO Item Number PO Vendor Address
POI Description PO Number PO Ship Terms
POI Quantity PO Number PO Item Number PO Payment Terms
POI Price PO Item Number POI Quantity
POI Extended POI Description POI Price
Price POI Quantity POI Extended Price
POI Price PO Item
PO Number
POI Extended Price PO Item Number
POI Quantity
Item Number POI Price
Description POI Extended Price X
Price

Item Number Inventory Item


Description
Price

*X indicates deleted items or relations. Relations are deleted if they are duplicates, are consolidated if they have identical
keys or are proper subsets, or are named. Attributes are deleted if they are derived by the application. POI Extended
Price is derived by multiplying POI Quantity by POI Price.

FIGURE 9-5 Tabular Normalization Example

Operations Public Service Sample business functions for ABC Video are
Planning Research and shown in Figure 9-6.
Product Management Development When the functions applicable to application
Product/Customer Research development are identified, functional decomposi-
Service Sales tion is performed. Functional decomposition starts
Public Aid Scheduling at the business function level to identify the major
Public Facilities Service Offering, activities of the function, and progresses to identify
Management e.g., Instruction in the processes and subprocesses for each function
Public Protection a school (see Figure 9-6). An activity is some procedure
Management Student Management within a business function that can be identified by
Public Relations its input data and output data, which differ. The
334 CHAPTER 9 Data-Oriented Analysis

ABC Video
Company

Purchasing Rental/Return Accounting


Business {
Function

Analyze
Business
Create Purchase
Orders
Monitor PO
Receipt
} Business
Area
Activities

FIGURE 9-6 ABC Video Business Functions and Activities

activity level must fully define the function. That is, an elementary process is the smallest unit of work
the activity level is complete when all possible pro- users identify.
cedures performed within the scope of the function Figure 9-7 is a sample decomposition showing
are present in the diagram. Full definition is required processes that define the two purchasing activities
to ensure complete data, process, impact, and orga- within ABC Video. Don't forget that the business
nization design analysis. activities and processes in a decomposition fully
Activity names are usually of the form verb- define the scope of the parent business function.
object, where the verb identifies the major transfor- Decomposition results are used to develop a
mation and the object identifies what is transformed. process dependency diagram. A process depen-
Exceptions to this rule are accepted when a name dency diagram, like an ERD for data, identifies the
is conventionally called by a different form, for sequence and types of relationships between pro-
instance, Cash Management is more common usage cesses. Process relationships describe logical con-
than Manage Cash. nections that include cardinality, sequence, iteration,
Activities are decomposed into their processes. and selection components (see Figure 9-8). Thus, the
A business process identifies the details of an process dependency diagram shows the logic of
activity, fully defining the steps taken to accomplish sequence, iteration, and selection for each process.
the activity. Again, full definition is required to The process dependency diagram is then expanded
ensure completeness of the ensuing analysis. Proce- to include entities and data stores to emulate a data
dural steps named by processes are repeated and flow diagram from process analysis. The result is a
have definable beginnings and endings. Decompo- process data flow diagram (PDFD).
sition continues until the elementary, or atomic, level Connections between procedural steps in a PDFD
of each process is identified. An elementary process are due to data passing from one step to the next and
is a procedure that cannot be decomposed further causing it to activate. This type of connection is
without making the procedure lose its identity. Thus, called a process data trigger. A trigger identifies the
Definition of Business Area Analysis Terms 335

Purchasing

Purchase
Videos

Place Monitor
Order Order Receipt

Identify Items Identify


& Vendors Late or Problem
Orders

Call Vendor to
Verify Availability Call Vendor
and Price and Inquire
or Reconcile

Create and Verify Receipts


Mail Order Against Orders

Send Invoices
File Order to Accountant
Copy by Vendor

FIGURE 9-7 ABC Video Partial Functional Decomposition of Purchasing

arrival of some data that causes a business process to name the events. For instance, the arrival of a new
execute. Process data triggers (or just data trig- video releases list (see Figure 9-9) is an event that
gers) identify data that flow from one process to triggers the purchasing process.
another to start execution of the receiving process. In Because the components of the process depen-
a PDFD, the directed lines between processes signify dency diagram are different from those of a DFD,
a data trigger. In addition, external events can cause the PDFD that results from process dependency
a process to activate. An event trigger signifies data analysis is also different. Several key differences
from some business transaction that causes process- are important. First, there is a sequence to the pro-
ing to take place. Event triggers are drawn on the cess data flow. The directed arrows on Figure 9-
PDFD by large arrows with words inside the icons to 9 indicate that some output from a process causes
336 CHAPTER 9 Data-Oriented Analysis

Identify Items
&
Vendor

Until no more items

Call Vendor
Until no more vide os to Verify
Availability
and Price

If vendor, price known

Create and
Mail
Order
Until no more vendors

File
Order Copy
by Vendor
Until no more vendors

FIGURE 9-8 ABC Create Order Process Dependency Diagram

the execution of the next process. Variations in In a DFD, this information either is characterized as
the directed arrow lines define variations in the a data flow or is hidden within process logic.
sequence. Second, the media that connect processes The last step of BAA is the development and
are not implied as in a DFD. 3 The information that analysis of an entity/process matrix, also known as
passes between processes is identified, but the form a CRUD matrix. If no enterprise level ERD exists
of the data is not. For example, the Identify Items and first, then an ERD is created. The entity/process
Vendors process in Figure 9-9 generates data that matrix lists entities across the top and business
passes to later processes. The shared data might be processes down the side (see Figure 9-10). Each
mental, paper, an automated data flow, or a file. The cell of the matrix, then, points to a process-entity
decision of media, or stored form, of data is deferred combination. For each cell, the systems engineers
until design unless it is fixed. Data files, such as Ven- define Create (C), Retrieve (R), Update (U), Delete
dor and Order files on Figure 9-9, are identified (D), or no (blank) responsibility of each process for
because they are known. Third, data and event trig- each entity. Subject area databases are defined by
gers identify the cause of execution of each process. analyzing logical groupings of processes and entities
based on their affinity. Affinity means 'attraction' or
3 Remember, DFDs require identification of either a data flow 'closeness.' Affinity analysis clusters processes
or a data store as the data linkages between processes. which share data creation authority for an entity.
Definition of Business Area Analysis Terms 337

Identify Items
& Vendor File

Until no more items

Until no more videos

If vendor, price known

Create and
Mail
Order
Until no more vendors

File
Order Copy Order File
by Vendor
Until no more vendors

FIGURE 9-9 ABC Create Order Process Data Flow Diagram

These logical groupings become the basis for data- of processes is related back to the organization (in a
base design. In Figure 9-10, a partial example of similar matrix). Ideally, processes that share data
Create Order and Monitor Order Receipt processes, responsibility should be in the same organization and
and the entities they use, are analyzed in an entity/ report to the same manager. For instance, the ABC
process matrix. The matrix shown is clustered by Purchasing processes show three potential group-
entity affinity and is ready for analysis. After analy- ings. If each process is evaluated with all of the data
sis, the processes and entities are sorted to show it uses, the three groupings meld into one based on
affinity based on the actions taken on the same enti- the criteria that 70% or more of the data are com-
ties (see Figure 9-11). monly shared. If all of these processes report to one
Two sets of analysis are performed on the results manager, the organization is probably adequate. If
of affinity analysis. The first analysis is to determine the three possible groupings all report to different
the adequacy of organization design based on who managers, the organization should probably be
creates and has responsibility for data. Each cluster redesigned.
338 CHAPTER 9 Data-Oriented Analysis

Entities= Purchase PO Item Inventory Vendor


Processes Order Item

Identity Items
& Vendors R CRU

Call Vendor to
Verify Avail/Price RU

Create & Mail Order CRUD CRUD R R

File Order Copy


by Vendor R R

Identify Late &


Problem Orders R R R RU

Call Vendor &


Inquire on Order RU RU R R

Verify Receipts
against Order RU RU

Send Invoices
to Accountant RD RD

FIGURE 9-10 Create and Monitor Order Receipt Entity/Process Matrix

The second analysis looks at the data entities The last step of BAA is to finalize all informa-
by process cluster to define subject area databases. tion found during the analysis in a data dictionary
A subject area database is normalized across or CASE repository. Since dictionaries were dis-
the organization and provides shared support cussed in detail in Chapter 7, in this chapter we will
for one or more business functions. At the ap- document the information found using the same for-
plication level, one subject database is assumed. mat as in Chapter 7, but will not comment again on
In the ex-ample in Figure 9-11, one database the format of entries.
would support the purchasing function; the database To summarize, business area analysis begins with
would have at least two user views to package Pur- an entity-relationship diagram that is fully identified,
chase Order with Purchase Order Item and normalized, and analyzed for class structure. Busi-
Inventory Item with Vendor. A fourth user view ness functions are identified and decomposed to cre-
linking all entities might be used for retrieval ate process hierarchy, process dependency, and
processing. process data flow diagrams. The business proces es
At the organization level, if the process groupings from the decomposition are coupled to entities from
are logical and useful, they are the basis for reaf- the ERD. Data-related responsibilities are described
firming the scope of applications. At the business for each process. Affinity analysis of the CRUD
area level, the groupings of processes should be con- matrix is used to decide organizational and database
sistent with the scope of the activities defined for groupings for further design and management action.
the application. If they are not consistent, then man- Next, we turn to a detailed description of how to per-
agement review and rescoping of the project are form each activity, exemplified by the ABC Video
required. Rental Processing application.
Business Area Analysis Activities 339

I Entities= Purchase PO Item Inventory Vendor


Processes Order Item

Create & Mail Order CRUD CRUD R R


Call Vendor &
Inquire on Order RU RU R R
Verify Receipts
against Order RU RU R

Send Invoices Subject Area 1


to Accountant RD RD

File Order Copy


by Vendor R R

Identify Late &


Problem Orders R R R RU

Identity Items
& Vendors R CRU
Subject Area 2
Call Vendor to
Verify Avail/Price RU

FIGURE 9-11 ABC Purchasing Process Affinity Analysis

5. Promote all many-to-many relationships to


BUSINESS AREA _ define associative entities.
ANALYSIS _ 6. Normalize the fundamental entities, analyz-
ing if there are other entities which are hid-
ACTIVITIES _
den in the current definitions. Place new
entities in the ERD. Define the new entities'
Develop Entity-Relationship attributes and primary keys.
7. Analyze the entities and their relationships to
Diagram determine if a class structure is needed. If
Rules for Entity-Relationship Diagram some instances of entities have identifiable
differences in processing, data stored, or rela-
The steps to building an entity relationship diagram
tionship participation, classes probably are
(ERD) are as follows:
needed.
1. Define fundamental entities and their primary
keys. The first step is to define fundamental entities and
2. Define the relationships between the funda- their primary keys. Identifying entities is a difficult
mental entities. process until you have done it several times. It is
3. identify all attributes of entities, including easy to talk about entities, but less easy to define
primary keys. them. Part of the difficulty is that entities are
4. Add attributive entities, where needed, to context related. An entity for one company/appli-
simplify one-to-many relationships. cation may not be an entity in another company/
340 CHAPTER 9 Data-Oriented Analysis

ENTITY DEFINITION IN XYZ ANNUITY


In Exqmple 7- l , we discussed how at the ■ an organization that pays in to a
annual meeting of the XYZ board of directors pension plan for its employees
in 1991, the marketing director said that she ■ an organization that requires counsel-
had four different, irreconcilable counts of the ing about products and services
numper of institutions the company serviced. provided by us
What was worse was that there was a de- ■ an organization we target for market-
fendable definition of each number. ing campaigns
The board thought that was terrible and ■ an organization that defines a pension
ord red a redevelopment of the Institutional plan
Processing application to resolve the prob- ■ an organization that is subject to a
lem. When Diane Smith, the software engi- pension plan that may or may not be
neer, began work on the application, her first of its own definition
task wos to develop an ERD for the informa- ■ an organization that is subject to legally
tion, without regard to the c4rrent files (12), defined pension plans by the state
applications (6), interfaces (4), procedures government in which it resides
(28), or time relationships currently used in the ■ an organization that receives informa-
organization. Just in sheer numbers, this was tion about pension plans of the subor-
a significant amount of information to be ganizations for which it administers
ignored. plans
Twenty-two different people were inter-
viewed, resulting in 22 different definitions of Working with a data administrator, Diane
an institution. They included such descriptions and the key users unraveled the spaghetti of
as: definitions to uniquely define major entities for

application. When in doubt, define more entities ERDs depict the big picture, capturing the orga-
rather than less. You can always eliminate unneces- nization and its constituent activities. For this dia-
sary entities when the information for deciding gram, we must constantly remember to ask: What
becomes clear. processes and activities are legal in the context of the
It is important to define each entity using terms business? Not: What is legal based on todays pro-
that apply for all of its uses in the company. Such cedures in our company?
definitions may not match current definitions of the In general, entities define something about which
entity in use in the organization. An example in the business keeps information. An entity can be a
defining the terms from an educational pension firm person, object, application, concept, or event about
(see Example 9-1) shows the difficulty dealing with which the application maintains information. For
current thinking about entities and th ir definition. example, customer, order, and inventory are all
Current thinking is frequently imprecise, muddled, entities. Entity names are usually nouns, however,
and even inconsistent as the example shqws. Unrav- NOT all nouns are entities. First, define a list of pos-
eling the spaghetti of definitions imbedded in the sible entities. Then, examine each entry and ask
various terms used to describe institutions, colleges, yourself the following:
campuses, plans, and their relationships took t4ree
people much of six months, working with 10 user 1. Is this a noun? If yes, continue. If not, either
departments for the information. rename it or strike it from the list.
Business Area Analysis Activities 341

(Continued)

the organization. The following definitions, Plan-A legal description of the


which took six months to attain, fully explain product(s) offered, eligibility and wait-
all variations of XYZ Annuity's institutional ing period requirements, and other
processing. pension plan provisions. Usually, and al-
ways after 1992, each plan defines the
XYZ Annuity Entity Definitions
offering for one product.
State Optional Pension Plan (SOPP)-An Product-A pension service offered by
optional pension plan(s) defined by Educational Pension Trust, including
law, governing institution(s) specified in individual annuity, group annuity, sup-
the law. SOPP institutions must adhere plemental retirement, or group supple-
only and completely to the legal mental retirement accounts. Each
requirements of the SOPP. product defined requires definition of
Institution-A legal entity that is governed one or more investment types allowed.
by an SOPP or, if not, may define its Investment type-Annuity, Money Market,
own pension plan(s) subject to Internal Educational Pension Trust Stock fund,
Revenue Service limitations. and Educational Pension Trust Bond
Campus-A legal entity that is a subunit of fund.
an institution. If an institution defines its
These six definitions sound simple enough
own plan, one of the plan items speci-
to be obvious, but they began with a total of
fies whether or not campuses are
120 different interpretations.
bound by its definition. If a campus is
not bound by the institution plan, it
may own its own plan(s).

2. Is this potential entity (replace with the name 5. Give a formal name to the entity and define
of the potential entity) unique with a clearly its primary key.
defined purpose? If yes, continue. If no, 6. Draw one rectangle for each entity to begin
either define the item uniquely from the con- developing the ERD.
text that led to its being on the list, or strike it
from the list. Once you are comfortable with the entities,
3. Can this potential entity take a value? If yes, begin defining their relationships. Relationship
it is an attribute; strike it from the list. If no, names, describing entity associations, are usually
continue. verbs, however, NOT all verbs describe relation-
4. Does the business area need to keep informa- ships. The goal is for all rules of association to be
tion about this potential entity? If yes, con- unambiguous. First, define possible relationships.
tinue. If no, ask why it is on the list. If it trig- In general, ask yourself how entities relate to each
gers processes, continue. If it is a different other. If I have Entity A, do I also have Entity Bs? If
form of some other entity (for instance, an so, how many are legal? Ask the question without
order report is a paper version of an order), regard to each entity's current usage in the company.
strike it from the list. If it is unique but does As with entities, relationships should define what is
not fit the other criteria, leave it on the list legal within a business context. Sometimes, ignoring
for now. current definition is extremely difficult because we
342 CHAPTER 9 Data-Oriented Analysis

and users internalize such definitions and use them read the relationship above the line from left-to-
to narrow our focus and simplify the world. right, and the relationship below the line right- to-
Examine each possible relationship and ask your- left. For instance, customer places order and order is
self the following: placed by customer (see Figure 9-12). The words
are placed differently depending on the placement of
1. Is this a verb? If yes, continue. If not, either
the entities on the diagram. By convention, the ac-
rename it or strike it from the list.
tive verb (in this example, 'places') is positioned on
2. Is this verb an action? If no, continue. If yes,
top of the line with the acting entity ('customer'
remind yourself that relationships do NOT
here) on the left of the diagram.
describe processes or processing. If the verb
Next determine the number, or cardinality, of the
is a process, strike it from the list.
relationship. The number of the relationship is one of
3. Is this potential relationship (replace with the three possibilities: one-to-one, one-to-many, or
name of the potential relationship, e.g., place many-to-many. A one-to-one relationship defines
as in customers place orders) unique with a a situation in which every entity A relates to one and
clearly defined purpose? If yes, continue. If only one entity B. In a one-to-many relationship
no, either define the item uniquely from the every entity A relates to zero to n, that is, any number
context that led to its entry on the list, or of entity Bs. In a many-to-many relationship all
strike it from the list.
As can relate to any number of Bs. Decide cardinal-
4. Is this potential relationship needed to fully
ity by asking the same questions of each side of the
describe the business area's data? If yes, con- relationship: If I have one entity A, how many
tinue. If no, ask yourself why it is on the list. entity Bs can I have associated with it at any point
If it is not clear what the reason is, continue,
in time? Conversely, if I have one entity B, how
leaving the relationship to be reevaluated
many entity As can I have associated with it at any
when more information is known. If the rea-
point in time?
son is not related to the business area, strike
An example of the time issue relates to student
it from the list.
registration and tracking. A student may take many
Once you define a relationship, draw a line(s) to classes in one semester; this describes a 1:n relation-
connect the entities participating in the relationship. ship. Over time, students take many courses and
Mark the diagram with a verb to describe each courses contain many students; this is an m:n rela-
direction of the relationship. The convention is to tionship. Which is correct? The m:n relation that

Places
Customer Order
Is Placed by

Is Placed by
Order Customer
Places

FIGURE 9-12 Placement of Words on Entity-Relationship Diagrams


Business Area Analysis Activities 343

any given order, it is associated with one, and only


one, customer.
Places
Customer
/ Order Lastly, for each entity in a relationship, we decide
Is Placed by "' whether the entity is required or optional in the rela-
tionship. In a required relationship, the entity must
be present for the other entity to exist. In an optional
FIGURE 9-13 Relationship Cardinality and relationship, the entity described may or may not
ERD Representation exist when the other entity exists. Either an 'o' or a
vertical bar, 'I', shows each side of a relationship as
optional (o) or required (I).
Returning to the order example, customers place
describes the student-course relationship without orders at their discretion, so orders are optional. Cus-
regard to time is correct within the context of a stu- tomers are required to have been identified as cus-
dent registration application. tomers to place orders, so customer is required (see
Draw crows' feet to show cardinality of each Figure 9-14).
relationship. Crows' feet are reverse arrow heads In the order-item relationship, orders do not exist
that indicate a 'many' numbered relationship.4 The if there are no items ordered, so order is required.
example in Figure 9-13 shows the relationship of The vertical bar ('I') bisects the relationship line
customer to orders as one-to-many. That is, for close to the order entity. Examining the items, we
any one customer, one to many orders may be have a similar relationship. For an order to exist,
associated with it. Conversely, the relationship of there must be at least one item, so item is also
orders to customers is one-to-one. That is, for required. Both sides of the relationship line have a
vertical bar (see Figure 9-14). 'Read' this entire
relationship as follows:
4 This is the IE convention. There are other techniques for
drawing ERDs, such as Chen's [1976]. Chen uses multiple Orders contain items. For each order, there are one or
arrow heads for 'many' relationships and uses diamonds to more order-items. For an order to exist, at least one
identify relationships with only one verb. The logic of both order-item is required. An order-item is contained in
approaches is identical. Martin's notation is used here because order. For an order-item to exist, an order is required.
it is automated in CASE tools. For each order-item, there is one, and only one, order.

Customer
I
Places ,.._/ Order
I
Is Placed by '-'"' -.-

Contain Is Contained
by

/
Order Item

FIGURE 9-14 Required/Optional Relationship Representation


344 CHAPTER 9 Data-Oriented Analysis

M:N Relationship:

Promoted and Transformed Relationship:

. Vend-or .I 1 m4. V_endo-r-Partn- 'I. -Pa-r-t

FIGURE 9-15 Many-to-Many Relationship Promotion and Transformation

Similarly, associative entities are created by pro- tabular normalization can be used to complement,
moting m:n relationships, joining the primary keys validate, or replace direct normalization. Tabular
of each participating entity to identify the associa- normalization requires complete definition of data
tion. Other fields might also be needed to provide and relationships, and results in exactly the same
unique identification. The m:n relationship is con- entities as direct normalization.
verted into two 1:m relationships in the promotion To use tabular normalization, first describe each
process (see Figure 9-15). entity and all entity attributes. Cluster attributes
After all known relationships are defined and depending on whether they are singular or multiple
entered on the diagram, we define attributes for the occurrences. (Tabular normalization rules are sum-
entities and normalize them (Steps 3-6 of list on marized in Table 9-1.) Then, proceed to remove
p. 339). The goal of this part of the exercise is to de- repeating groups. For each repeating group create a
fine hidden attributive and associative entities. In the new relation. The key of the new relation is the key
example above (see Figure 9-14), Order and Cus- of the repeating group and the original key. To
tomer are fundamental entities. Order-Item is an at- remove partial key dependencies, create new rela-
tributive entity. If it had not already been identified, tions of any attributes and the part of the key to
either normalization would identify it, or it would which they relate. The key of the new relation is the
be identified by answering the question: Can any of part of the original primary key that functionally
the attributes relating to entity Order occur more defines the relationship. Finally, remove nonkey
than once? If the answer to this question is yes, there dependencies by creating new relations from the
are attributive entities to be identified. nonkey attributes that are related. The key to the new
Direct normalization of ERDs is possible but relation is the attribute(s) that define the functional
requires detailed understanding of data. When you relationship. In the tabular method, multivalued
have an ERD but are less comfortable about your dependencies are treated as single attribute, repeat-
understanding of the data and their relationships, ing groups in the nonnormalized set-up stage.
TABLE 9-1 Normalization Rules
For Unnormalized Data

1. Identify all attributes that relate to an entity. Keep in mind that there are several types of attributes.
■ Nonrepeating, primary key attributes(s). A nonrepeating attribute is a single fact about an entity type.
A primary key is a unique identifier for all attributes associated with an entity type.
■ Nonrepeating, nonkey attributes(s) are single facts about an entity type.
■ Repeating attribute(s) are facts that may have more than one occurrence for a specific value of an entity's
primary key. Repeating attributes may be single repeating facts, such as the date of birth of offspring; or may
be groups of repeating f&cts, such as date of birth and name of offspring. Repeating attributes are either
repeating key attributes or repeating nonkey attributes. Repeating nonkey attributes are listed with their
primary key identifier.
2. List all attributes that relate to an entity together. Indent repeating information. Skip a line or leave a space
between entities and between repeating groups. Repeating groups might have only one attribute that repeats; this
is also called a multivalued dependency. Place an asterisk at the first attribute of each repeating group to show
its beginning.
3. Underline the primary key field(s) of the unnormalized relations, including keys of both singular groups and
repeating groups.
4. Proceed to first normal form.

First Normal Form (lNF)-The Goal of lNF Is to Remove Repeating Groups

1.1. Examine each relation. If the relation has no repeating groups, it is in lNF. Draw an arrow from the unnormal-
ized column to tp.e normalized colµmn to show that the analysis i complete, and continue.
1.2. If the relation has repeating groups, build a relation from the single nonrepeating fields. The key of the relation
is the key of the original relation. Contique.
1.3. Next, for each repeating group, build a new refation of the repeating information. Append the key of the original
relation to the repeating information. The key of this relation is the key of the original relation plus the key of
the repeating group.

Second Normal Form (2NF)-The Goal of 2NF Is to Remove Partial Key Dependencies

2.1. Examine each relation independently. If the lNF relation does not have a compound key, it is in 2NF. Draw an
arrow from the relation through the 2NF column to show that it is complete, and continue.
2.2 If the lNF relation has a compound key for each nonkey field, ask the following question: Do the data field
relate to the whole key? In other words, do yoµ need to know the whole key to know the values of the attribute,
or do you only need part of the key to know the value of the attribute? If the answer is that you need the whole
key for all fields, the relation is in 2NF. Draw an arrow from the relation through the 2NF column to show that it
is complete, and continue.
2.3 If by knowing a part of the key we know the value of one or more data fields, then we will build two new types
of relations. First, build a relation with the nonkey data field(s) that are wholly dependent on the compound key.
The key of this relation is the key of the lNf r lation.
2.4 Second, build one new relation for each partial key identified. The new relation(s) include the nonkey data
field(s) and the part of the original !cey on which they are fully dependent.

(Continued on next page)

345
346 CHAPTER 9 Data-Oriented Analysis

TABLE 9- 1 Normalization Rules (Continued)

Third Normal Form (3NF)-The Goal of 3NF Is to Remove Nonkey Dependencies

3.1 If the 2NF relation(s) have only one nonkey data field, it is in 3NF, go to optimization.
3.2 If all data fields in the relation(s) are dependent upon the key and nothing but the key, then the relation is in
3NF. The question here, is "Do nonkey fields relate to the key or do they really relate to each other?"
3.3 If a nonkey dependency exists, build one relation of the nonkey data field(s) that are dependent on the 2NF key
(this include the nonkey field that is the key in the step below).
3.4 Build one new relation for each nonkey dependency identified. The new relation(s) include the nonkey data
field(s) and the nonkey field on which they are dependent. The key of this relation is the nonkey field from the
original relation on which the other field(s) is dependent.
Now, check for anomalies ... conditions that still will cause errors. This is one way of double-checking that
your original relationships were correctly defined. Ask two questions.

1. Given a value for a key(s) of a 3NF relation, is there just one possible value for the data? If the answer is NO,
then multivalued dependencies exist. Check that the correct data relationships are defined, then treat the multi-
valued single fact as a single-attribute repeating group and renormalize the data.
2. All are attributes directly dependent upon their related key(s)? If the answer is NO, then transitive dependencies
exist. Treat the transitive dependency like a nonkey dependency and renormalize the data.
Finally, synthesize and integrate the relations.

1. Remove any fields that are computed in the application. This does not mean that these attributes are not stored in
the physical database; it means that they are not logically required to define the entity.
2. If two or more relations have exactly the same primary key, combine them into one relation. Make sure that each
attribute occurs only once.

At third normal form, synthesis of the resulting the fundamental entities are added to the diagram as
relations is performed to needed to fully depict the information.
Next, the entities and relationships are analyzed
■ combine relations that have identical primary
to determine if a class structure is needed. The rea-
keys but different nonkey attributes
soning process is as follows:
■ eliminate relations which are exact duplicates,
or proper subsets, of other relations
1. Ask if this entity occurs in this, and only this,
■ combine relations for which the primary key
form (i.e., with all attributes) for every legal
of one is a proper subset of the primary key of
occurrence of the relationship being exam-
another
ined? If the answer is yes, continue. If the
After normalization and synthesis are complete, answer is no, you must define subclasses that
new entities (or relations) and their relationship to describe the contingencies of existence for
Business Area Analysis Activities 347

the entity. This procedure is described in the To determine subclasses, you must determine
next section. which information is kept (or which processing is
2. Does this relationship hold for all occur- done) for which type (or subclass) of orders. Ask
rences of the entity? If yes, continue. If no, questions about every possible variation of infor-
follow the reasoning below to determine the mation and processing until 'if-then-else' logic sur-
subclasses of the entity and their relation- faces. Use the alternative situations to define the
ships. subclasses. That is, one subclass for the if logic,
3. Is this entity ever optional? If no, continue. If another subclass for every other else if logic. Ask
yes, follow the reasoning below to determine questions of each type of information about every
the subclasses of the entity and their relation- entity. Don't stop just because you find one subclass;
ships. there may be others. When you have found all sub-
4. Can only a subset of occurrences of an entity classes, verify them with the user and modify the
participate in a given relationship? If no, con- diagram accordingly.
tinue. If yes, follow the reasoning below to For instance, in an order fulfillment application, a
determine the subclasses of the entity and legal entity relationship describes 'customers place
their relationships. orders' (see Figure 9-16), but that information may
5. Have several types, or kinds, or categories of not be the same for all customers' orders. Does the
an entity been identified? If no, continue. If time of day or time of month affect the relationship?
yes, follow the reasoning below to determine Do the shipping address differences affect the rela-
the subclasses of the entity and their relation- tionship? Does the sold-to/ship-to arrangement
ships. affect the relationship? Does the type of goods
6. Are words like "either, or, sometimes, usu- ordered affect the relationship? Does the type of pay-
ally, generally, in certain cases" ever used in ment affect the relationship? In this example, we will
describing entity behavior? If no, continue. If say that Cash Order information kept includes Cus-
yes, follow the reasoning below to determine tomer ID and Total Amount, where Credit Order
the subclasses of the entity and their relation- information kept includes Customer ID, Name, Sold-
ships. to/Ship-to addresses, Order Date, Shipping Terms,

Before
Subclasses: After Subclasses:

Customer
Customer :
-c Tc
/' j /'
_c h_ l_cr di
Order
Order

FIGURE 9-16 Examples of Subclasses in Customer-Order Relationship


348 CHAPTER 9 Data-Oriented Analysis

for each item (Item Number, Item Description, first-cut definition of the potential fundamental enti-
Quantity, Price, Extended Price), Sales Tax, and ties in ABC rental processing includes: customer,
Total. Here, we know there are subclasses because video, rental, printed rental, clerk, and system. These
different sets of data are kept. The next issue is to entities are identified from the ABC Rental Process-
decide the entity(s) to which the subclasses relate. ing requirements in Chapter 2. Next we analyze each
To decide which subclasses apply to orders, we potential entity to see if it really is in the business
ask if the entity Order is affected differently by cash area and application.
and credit sales. If the answer is yes, different infor- Customer is a noun. It uniquely defines the people
mation is kept for each. In this example, there would who rent and return videos. By itself, customer does
be subclasses for Cash Order and Credit Order. not take on a value; rather, each customer is de-
Then, we ask if the entity Customer is affected dif- scribed by a set of attributes. The business must keep
ferently for cash and credit customers. Are all cus- information about customers renting videos to do
tomers either cash or credit? What are the rules for business with them. The formal name is Customer.
buying on credit? The common answer is applied Video is a noun. It uniquely defines an item from
here. Some customers are only cash, thus, creating inventory that is available for rent. By itself, video
a cash customer subclass. Some customers are qual- does not take on a value; it has descriptive attributes.
ified to buy on credit, but they are not required to The business must keep information about videos to
buy on credit. That is, credit customers can pay conduct its business. The formal name is Video.
either by cash or by credit. Therefore, knowing Rental is a noun that uniquely describes videos
which type of order a customer will create is only rented by customers for a specific period. By itself,
possible if the customer is a cash customer. Depend- rental does not take on a value; it combines attri-
ing on the application, these customer subclasses butes of Customer and Video with attributes of its
might be important. Here, we will say they are. The own. The business must keep information about
ERO is altered to show the subclasses of each entity rentals to provide an audit trail for tax purposes. The
class and how they now relate to each other. Notice formal name is Rental.
that the simple before diagram in Figure 9-16 is A Printed Rental is a noun that describes videos
more complex with subclass additions. rented by customers for a specific time period. A
To summarize, first define entities, then relation- printed rental is not unique since its definition mir-
ships, then attributes. Promote the many-to-many rors that of rental. However, it is unique in that it
relationships to associative entity status and modify shows the customer signature. If there is a legal dis-
the diagram to reflect the new entities. Add attribu- pute over charges, the business is required legally to
tive entities as required for repeating information provide documentation that rental took place, and
relating to entities. Identify all new attributes of all the customer knowingly rented. The business does
entities. If necessary, do tabular normalization of not keep information about a printed rental, though;
the relations. Analyze each entity to determine if the information is about a rental.5 Printed rentals are
subclasses are required and modify the diagram to another medium or form of Rental. Printed Rental
describe them. These activities are best documented is stricken from the list.
in a CASE tool with repository (or dictionary or Clerk is a noun uniquely describing the person
encyclopedia) entries made as the work progresses. who initiates processing for the application. By
At the end of ERO creation, you have not only the itself, clerk does not take on a value. The business
ERO, but also the repository definitions for all items does not need to know who did the entry of infor-
in the ERO. mation unless Vic changes the requirements of the

ABC Video Example Entity-Relationship 5 If customer signature was kept, or if we just left printed rental
Diagram on the list, when the data were normalized we would find that
the primary keys to the printed rental and the rental were
The first step (refer to the list on p. 339) in develop- identical. That would lead us to combine the fields in one rela-
ing the ERO is to identify fundamental entities. A tion called Rental.
Business Area Analysis Activities 349

Customer

Is
Request Requested
by
Jr\
Contains /
Rental Video
Is Contained in"\,,,

FIGURE 9-17 ABC Rental Processing-First-Cut Entity-Relationship Diagram

application. Since clerk is not required, we strike it relationship. That is, each Customer may place one
from the list. or more Rentals. Each Rental is placed by one and
Similarly, system is a noun that uniquely de- only one Customer.
scribes the hardware/software environment that will Similarly, each Rental contains one or more
do rental processing. The system has no personal Videos; each Video can be rented by one and only
values, and neither do we maintain information one Rental at a time. We have a problem with the
about the system. System is stricken from the list. clause at a time in this definition. Relationships are
Next we draw a rectangle for each of the three supposed to be defined without regard to time. How
entities that remain: Customer, Video, and Rental. do we account for this problem? We might defer a
Figure 9-17 shows the entities and relationship( s) decision on how to deal with this until some later
between the fundamental entities. Customers request time, making a note of the need for 'date' as an iden-
Rentals. Rentals contain Videos. The relationship tifier for the video-rental relationship. Or, we might
names are unique verbs describing the interactions. remove time from the definition, creating the ERD in
The line connecting Customer and Rental contains Figure 9-18 which shows a many-to-many relation-
crows' feet at the Rental side to show a one-to-many ship with rental and video. That is, each video may

Customer

Is
RequeSt Requested
<D by
Jr\
"- ""'Contains /
Rental 1 Video
1
Vi'o
s ntained in""

FIGURE 9-18 ABC Rental Processing-Second-Cut Entity-Relationship Diagram


350 CHAPTER 9 Data-Oriented Analysis

Customer

-- Is
Request Requested
0 by
/\
Contains
Rental
/I
Is
Contained (
by )
/""-
Copy

Is Described Describes
by

Video

FIGURE 9-19 ABC Rental Processing-Third-Cut Entity-Relationship Diagram

be rented more than once, and each rental may Identify attributes and associative entities. The
contain more than one video. We take this option m:n relationship of Videos and Rentals should be
at the moment, knowing that it is an incomplete promoted to make an associative entity. The new
definition of the relationships which need to be entity relates to each physical tape being rented.
refined. Thus, we have a Video entity and a Copy entity. We
Next we decide the nature of the relationships, reason through this creation in another way. Video
whether they are required or optional. A Customer information is not detailed enough to keep track of
must exist to place Rentals. A Video must exist to every physical tape in inventory because each video
be contained in a Rental. Does this make sense; must may have many copies. This leads us to add infor-
you have both a Customer and a Video to do a mation about copies. Referring to the case in Chap-
Rental? Yes, this makes sense. Now analyze the ter 2, we find that Vic wants to be able to track the
other side of the relationships. Are Rentals required status of any tape. The minimum copy information
for Customers to exist? No, Customers do not nec- needed is Video ID, Copy ID, Date Received, and
essarily have rentals every day. Are Rentals required Status. Other information might be considered, for
for a Video to exist? No, Videos can exist without instance, current month rental counts, but we defer
being related to a Rental. Both relationships of this for the moment. Figure 9-19 shows the ERO to
Rental to the other entities are optional. this point.
Business Area Analysis Activities 351

Does the insertion of Copy take care of the many- tabular normalization to proceed, first define the
to-many relationship? We can still have a Copy on attributes of each entity. From the functional
many rentals over time and Rentals can contain requirements in Chapter 2, list all attributes of each
many items, so the answer is no. Next we look at the entity. The list is shown in Table 9-2, in unnormal-
Rental to further examine its details. Rentals are sim- ized form, with the copy information identified as
ilar to orders. Just as an order has one or more items, repeating within video information. Make a sepa-
each rental can have one or more rental items. There rate list for each entity. For each entity, list together
is a one-to-many relationship of Rental to Rental- attributes that occur only once. Indent repeating
Item which we add to the diagram. By itself, this groups under the related entity, making sure that all
does simplify the many-to-many relationship; a information for each group is together. Underline
Rental-Item belongs to a specific Rental and relates primary keys for both nonrepeating and repeating
to a specific inventory Copy. Now the entities and information. Remember, the primary key uniquely
relationships look clean with all many-to-many identifies its information.
relationships promoted, and all apparent one-to- Next apply the rules in Table 9-1 to remove
many relationships explained (see Figure 9-20). repeating groups, partial key dependencies, and non-
To confirm the original and promoted entities, we key dependencies. Synthesize the 3NF results to
will normalize the data using the tabular method. For ensure minimal redundancy. The result of ABC's

Customer

Is
Request Requested
(
by
/\

Rental

C ontains - - Is
() Contained
/" by

'" ~ Refers to
1
Rental-Item ;r .._, I Copy
Is Referenced by

Is Described Describ es
by

Video

FIGURE 9-20 ABC Rental Processing Fourth-Cut Entity-Relationship Diagram


352 CHAPTER 9 Data-Oriented Analysis

TABLE 9-2 List of ABC Video Entity Attributes


Unnormalized Form- First Normal Form Second Normal Form Third Normal Form D
Repeating Groups, (lNF)-Repeating (2NF)-Partial Key (3NF)-Nonkey e
All Primary Keys Groups Dependencies Dependencies 1
Identified e

Customer Phone
Customer Name
Customer Address
Customer City
Customer State
Customer Zip
Customer Credit
Card Number
Credit Card Type
Credit Card
Expiration Date
Customer Phone
All Customer Info
from Above
Rental Date
Total Rental Fees
*Video ID
Copy ID
Video Name
Rental Date
Return Date
Rental Rate
Late Fee Due
Fees Due
Video ID
Video Name
Entry Date
Rental Rate
Copy ID
Date Received
Status

normalization is shown in Table 9-3. Now we have entire relation containing Video ID, Video Name, and
six relations to be synthesized and evaluated. Rental Rate is deleted because it exactly duplicates
In the synthesis step, several pieces of informa- information already in the next relation which has
tion are deleted. 'All Customer information' is not more attributes.
required to maintain rental information; only a Cus- To reconcile the 3NF results to the ERD, we look
tomer Phone or ID is required as a cross reference, at the Rental relationships again, and use some 'out
or foreign key, to the Customer relation. Total Rental of the box' thinking. The relationship we identified
Fees are calculated and, therefore, not required. The for Rental to Rental-Item is similar for many busi-
Business Area Andlysis Activities 353

TABLE 9-3 ABC Video Normalization Results


Unnormalized Form- First Normal Form Second Normal Form Third Normal Form D
Repeating Groups, (lNF)-Repeating (2NF)-Partial Key (3NF)-Nonkey e
All Primary Keys Groups Dependencies Dependencies 1
Identified e

Customer Phone
Customer Name
Customer Address
Customer City
Customer State
Customer Zip
.. ► ..
Customer Credit
Card Number
Credit Card Type
Credit Card
Expiration Date
Customer Phone Customer Phone
All Customer Info
from Above
All Customer Info ► ► X
from Above
Rental Date Rental Date
Total Rental Fees Total Rental Fees X
*Video ID
Copy ID Customer Phone Customer Phone
Video Name Video ID Video ID
Rental Date Copy ID Copy ID
Return Date Video Name Rental Date
Rental Rate Rental Date Return Date
Late Fee Due Return Date Late Fee Due
Fees Due Rental Rate Fees Due
Late Fee Due Video ID
Fees Due Video Name
Rental Date ..
Video ID
Video ID
Video Name
Video Name
Entry Date
► ►
Entry Date Rental Rate
Rental Rate
Copy ID
Date Received
Status
Video ID
Copy ID
Date Received
.. ►
Status

ness transactions: orders, confirmations, shipping business transaction. The question then is: Do we
papers, back-orders, and invoices. The question here need the Rental information separated? Is it uniquely
is: Do we need both entities? We require the Rental- different? Customer Phone is also in Rental-Item;
Item entity information because it documents the Rental Date is also related to each video the
354 CHAPTER 9 Data-Oriented Analysis

Customer: xxxxxxxxxxxxxxxxxxxx,xxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx, xx xxxxx
(xxx) xxx-xxxx
Open Rentals:

Video Copy Description Rental Pd Late Pd Other Pd

xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X 9.99 X 999.99 X


xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X 9.99 X 999.99 X
xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X 9.99 X 999.99 X
xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X 9.99 X 999.99 X

New Rentals

xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X


xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X
xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X
xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X
xxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxx 9.99 X

Total 99.99 99.99 9,999.99


Total Amount Due 9,999.99
Amount Paid 9,999.99
Balance 9,999.99

FIGURE 9-21 Partial Rental Screen

customer has. We eliminate Total Rental Fees as a a kludge, that is, a mess! If we delete this entity/
computed field but we need to redecide if we will relation, can we get the information another way?
ever need this information stored in a file. That is, can we recreate this relationship if we need
Continuing this reasoning, think of the processing to for any reason? The answer in this case is, yes.
to be done. When a customer requests a video, the Rental-Items all have Customer Phone and the first
system should display all open rentals regardless of one accessed can be used to retrieve customer infor-
when they were rented. The Rental-Item information mation. We conclude that we can eliminate the
will be listed down the screen in rows, one row per 'Rental' entity entirely. The completed, revised ERD
video (see Figure 9-21).6 A total of all open rental is shown as Figure 9-22. Rental-Item is renamed to
fees plus any new fees will be near the bottom. From Open Rental to avoid confusion about its contents.
where will customer information come? If we keep After removing the Rental entity, the relation-
the Rental relation/entity, we either choose one from ships and entities now appear minimal. That is, we
potentially several for display, or, if Customer Phone must keep all of these entities. If we remove any one
is entered first, we ignore them all. This sounds like of these entities, we cannot recreate the desired in-
formation for the removed entity, nor can we com-
6 This is another example of the jumping between levels of pletely describe all data relationships. With these
detail required to complete each logical step in the process. entities, we can represent the entire problem data
Business Area Analysis Activities 355

space, and we can accommodate all the processing An accurate and complete ERD is crucial to
required in the application. The ERD now appears developing an application that solves a real-world
complete. Keep in mind that complete does not mean problem. During development of the ERD, pay par-
cast in concrete; the ERD can be modified as re- ticular attention to entity definitions, making sure
quired to accommodate new information. they are distinct, simple, and precise. Analyze each
The reasoning process we used to eliminate the entity for selectivity in processing, data, or timing
rental entity can be used on any similar entities, for to determine if a class structure is warranted. Also
instance, orders. In other applications the higher analyze each entity for its actual need. If an entity
level entity analogous to the Rental entity here might can be recreated from other information, has no
be required. You cannot eliminate an entity when unique attributes of its own, and is not required for
any of the following conditions is true: legal purposes, omit it. Analyze every possible rela-
tionship to determine relationship existence. When
■ The entity has unique information of its defining relationship cardinality and required/
own. optional status, make sure time and current proce-
■ The entity, or its attributes, cannot be recre- dures are ignored. Do pay attention to legal require-
ated through combining other entities. ments and business requirements in defining
■ The entity is required for legal purposes. cardinality and required status.

Customer

Is
Request Requested
by

Refers to
I'.. I
Open Rental V 'J I Copy
Is Referenced by

Is Described Describ es
by

Video

FIGURE 9-22 ABC Revised, Complete Entity-Relationship Diagram


356 CHAPTER 9 Data-Oriented Analysis

Decompose Business Functions 7. Define the detailed procedures for accom-


plishing each process and document func-
Rules for Decomposing Business tions, activities, processes, and procedures in
Functions the repository.
First, identify (or verify) the functions applicable
If a functional decomposition was not yet developed
to the BAA activity. An easy way to check functions
at the enterprise level, it is created now. If a decom-
is to review the list of generic functions on p. 332
position was developed at the organization level, it is
and, for each, determine its applicability to the situa-
further decomposed here to define details of pro-
tion. Name each function so it relates to the busi-
cesses. In either case, decomposition is independent
ness context of the BAA. For example, if the
of the ERD; it can be done before, during, or after
function deals with finance, but in the client context
the ERD. IE recommends the ERD first, but while
finance includes both Finance and Accounting, use
you gather data for the ERD, you invariably get
the latter function name. Name each function with a
process information. Many practitioners concentrate
noun, preferably a nonqualified noun. For example,
on data first, but begin to build the decomposition
Finance is preferred to Corporate Finance. If users
simultaneously. The steps to functional decomposi-
have not participated in this activity, verify the list
tion are:
with a user. Place each function on the decomposi-
1. Define the enterprise for which the diagram tion under the enterprise identifier in rounded rec-
is being developed. Place the enterprise tangles (see Figure 9-23).
name in a rounded rectangle at the top of Next, for each function, define the major activi-
the diagram. ties and place them under the function they describe.
2. Define business functions of the enterprise. The diagram resembles an organization chart. When
Using consistent parts of speech for each complete, the activities should fully describe each
name, place the functions in rounded rectan- function. Do not pay attention to organizational
gles on the second row of the diagram. Do boundaries or current organization policies and pro-
not pay attention to current organization, pol- cedures. Do pay attention to legally required actions,
icy, or procedures in defining functions. Use actions that specifically relate to goals of the orga-
current business practices in the industry to nization, and industry practices that are required.
guide the definition and placement of func- Do identify timing, cardinality, or current business
tions (and activities and processes). practices for each activity.
3. Define the activities that fully define each Activity names do not have a specific form, but
function. Name them using consistent parts should be consistent in the part of speech used for all
of speech, usually of the form verb-noun. For names. In the example above, the function Finance
each function, create a separate diagram with might include several activities, such as Corporate
a row depicting the activities of the function. Finance, Regional (or Subsidiary-name) Finance,
4. For each activity, fully define the processes International Finance, Analysis and Reporting, Plan-
that describe work performed for each activ- ning, Budgeting, and Funds Management. In this
ity. Name each process using the form verb- example, Funds Management might have been
noun. Add processes under their respective called Manage Funds, but the inconsistent part of
activities on the diagram in the sequence in speech makes this a weak name.
which they are performed. Next, for each activity, decompose the activity to
5. Continue to decompose the processes and define the processes that fully describe the activity.
add them to diagrams depicting successive Processes may have their own subprocesses. Con-
levels of detail until the definitions are tinue decomposing until the elementary, or atomic
atomic. level, of process is identified. Recall that an elemen-
6. Verify all diagrams with the user. tary process is the smallest unit of work users can
Business Area Analysis Activities 357

Function Function

Activity Activity

Process

Process

Process

Process

FIGURE 9-23 Placement of Functions, Activities, and Processes on a Functional


Decomposition Diagram

identify. Name each process with a verb-object component parts. Therefore, these processes are
name. Within Funds Management, for example, atomic, or elementary. That is, each can be per-
processes might include: Manage Overnight Funds, formed as a unit, but cannot be further decomposed
Manage Cash, Manage Payroll Accounts, and Man- without losing its unit identity.
age Savings Accounts. Each of these processes can The difficulties of process decomposition lie in
be further decomposed to identify the details of the achieving parallel levels of abstraction and com-
procedure used to perform this process. Continuing pleteness. The goal is to maintain consistency within
with this example, Manage Overnight Funds might a level of process decomposition. The SE and user
include: Identify Funds, Identify Options, Analyze must work together during this definition because the
Options, Place Funds, Complete Accounting Entries. levels of detail are beyond IS knowledge. Only job
Each of these is a process, too, but these processes incumbents know exactly what they do and how they
cannot be further decomposed without requiring do it. The user is the main person defining the
interrogation of multiple processes to locate all of its decomposition, but the SE is the person who actually
358 CHAPTER 9 Data-Oriented Analysis

abstracts the diagram and systems information from application is concerned only with Rental Process-
the user-supplied information. The user relates each ing, so we decompose only the Rental Processing
process to all of the other processes, describing each function.
in detail. First, we define the activities of Rental Processing
Some clues to consistency of abstraction are and place them on the diagram in rounded rectan-
amount of work, user comfort, same type of inputs gles. Return to the case in Chapter 2 and outline the
and outputs, and timing. If all processes appear to major activities. If you have difficulty finding activ-
do similar amounts of work, they are probably at a ities, look at the entities and define the actions taken
similar level of abstraction. If the user feels comfort- for each entity. Obvious activities relate to customer
able that the information is similar, it probably is. and video maintenance and actual rent/return pro-
If the processes have similar types of inputs and cessing. Can you identify any others? If not, add
outputs, that is, they have no error processing and these to the diagram and decompose them. Activity
no exception processing at the same level, then they identification is not a one-time activity; it is ongo-
are probably at a comparable level of abstraction. ing and other activities might become obvious as
Similarly, if one process has error and exception you work through the processes. Keep in mind that
processing, the others also should have error and when you identify activities with a user, it is from
exception processing at the same level. their experience and not from written text, so it is
For concurrent processes, each process must be somewhat more direct.
performed completely independently of all other Both maintenance activities are decomposed into
concurrent processes. If concurrent processes are create, read, update, and delete processes (CRUD).
independent, then the abstraction level is probably Notice that the activity names are of the form verb-
okay. If concurrent processes have dependencies, object. The resulting additions to the decomposition
then determine the relationship between the pro- are shown in Figure 9-24.
cesses. Either the dependent process is, in fact, a Next, we must decide if rent and return are one
subprocess, or the processes are not concurrent. activity or two. This is the same issue we dealt with
During process identification and definition, mark in process design (in Chapter 8); here we will have
the diagram for processes that are used in more than slightly different results because the reasoning
one place. This identifies both potential reusable process is different. The questions here are: Can we
processes for the design activity and possible job define rental without reference to return? Can we
consolidation for organizational analysis. Make sure also define return without reference to rental? And,
that the names assigned to reusable processes are does this completely define rent/return processing?
exactly the same and actually perform the same The first two answers are yes, the third is no. Both
work. rentals and returns must accommodate the other
The larger the organization, the more likely you process as a subprocess for completeness. Therefore,
will need more than one level of process decomposi- rent and return processing must be combined as one
tion to describe fully the processes of each activity. activity.
Continue to decompose levels of subprocesses until An easy way to decompose these processes and
you reach processes that can no longer be described be reasonably sure we are complete and correct is to
as performing some whole action. decompose the four options separately. The options
are rent without return, return without rent, rent with
ABC Video Example Process return, and return with rent. A table listing the four
options and their subprocesses is shown as Table 9-
Decomposition 4. Several issues can be identified for discussion.
To begin, we ask ourselves what are the functions First, is Check for Late Fees the same level of
of ABC that relate to this BAA. The functions of abstraction as the other processes? Second, is Print
ABC are Purchasing, Rental Processing, Accounting Receipt the same type of process and does it belong
and Personnel/Payroll as shown in Figure 9-6. This on the table? Third, does this look complete? For
Business Area Analysis Activities 359

Purchasing Rental/Return Accounting Personnel/


Payroll

Customer Video
Maintenance Maintenance

Create
Customer

Update
Update Video
Customer

Delete
Delete Video
Customer

Query Customer Query Video

FIGURE 9-24 Decomposition for Customer and Video Maintenance

instance, where are Create Customer and Create This is all logic; there is no reading or writing to
Video when the items are not found in a database? files. Thus, this is a simple process that borders on
Last, can we consolidate these four lists to develop being too small to be called a process. This logic
one list for the decomposition diagram? could be included in another process if and only if
First, Check for Late Fees appears to be at a lower the other process has the same execution pattern for
level of detail than the other processes. To check each pass of the logic. This means we next look at
this, walk-through the process. To check for late how often Check for Late Fees is executed. Check
fees, data from an open rental must be in memory. for Late Fees is in every list, but is it executed for
every rental and return? The answer is that for all
If the Return Date is not equal to zero, subtract Rental open rentals, this process would execute to check for
Date from Return Date to get Number Of Days fees owed whether there are current returns or not.
Rented.
Also, for all returns, after the return date is added,
If Number Of Days Rented is greater than the allowed
the process Check for Late Fees should be executed.
amount (here we use two), multiply (Number Of
Days Rented- 2) by $2.00 (the late charge) to get
Next we review the logic to see if exactly the
Late Fees. same procedure is followed in both cases. The
If Late Fees are greater than zero, display Late Fees answer to this issue depends on when late fees are
and add Late Fees to Total Amount Due. considered. So far, we have talked about late fees for
360 CHAPTER 9 Data-Oriented Analysis

TABLE 9-4 Decomposition of Rental Options


Rental Without Return Return Without Rental Rental With Return Return With Rental

Get Customer ID Get Return Video IDs Get Customer ID Get Return Video IDs
Get Valid Customer Get Open Rentals Get Valid Customer Get Open Rentals
Get Open Rentals Get Valid Customer Get Open Rentals Get Valid Customer
Check for Late Fees Add Return Date Get Return Video IDs Add Return Date
Get Valid Videos Check Late Fees Add Return Date Check Late Fees
Process Payment and Update Open Rentals Check for Late Fees Get Valid Videos
Make Change
Create Open Rental Update/Create History Get Valid Videos Process Payment and
Make Change
Print Receipt Process Payment and Process Payment and Create Open Rental
Make Change Make Change
Print Receipt Create Open Rental Update Open Rental
Update Open Rental Update/Create History
Update/Create History Print Receipt
Print Receipt

tapes with return dates only. You may be tempted to sets of fields, one for the fee and a flag for fee pay-
charge fees every day as they accrue, whether the ment. The data and processing for the first option are
tape is returned or not. If you do this, you need very simpler, but this now makes the processes creating
complex logic to identify what fees are accrued, and updating open rentals dependent on successful
what fees are paid, and what fees are still owed. Process Payment and Make Change. This is not only
Complex logic is frequently wrong and is always an acceptable tradeoff, but a better business practice
error prone. If possible, use the KISS (Keep It Sim- since we do not want to update with unsuccessful
ple, Stupid) method and charge fees only when a payment processing. We note the new attributes and
return date is present. To continue this thinking, what add them to the repository.
rental attributes do we need to deal with late fees? The second issue deals with Print Receipt. Is
Do we need a late fees field? A flag when late fees Print Receipt the same type of process and does it
have been paid? The case does not tell us what Vic belong on the table? The printed rental orders could
wants; so we need to talk to him about this. be considered an output data flow of Process Pay-
In this case, Vic and the accountant decide that, ment and Make Change rather than requiring its own
for accounting purposes, they want to know all process. Since ABC defines printing of orders as a
charges applied to a rental. Information to be kept separate process required of the application, we
includes: regular fees, regular fees payment, late could leave it on the list. Unfortunately, the method-
fees, late fee payment, any extraordinary fees, and ology does not give guidance in the issue of whether
extraordinary fee payment. Notice they do not care to include or omit data printing processes. In general,
about payment dates. We have two choices for deal- if the printing is incidental to another process, that is,
ing with late fee data. First, we can compute fees and it is a record of the processing, then it is not separate.
add them to the file when paid or second, keep two A print process should be distinct if it fulfills legal
Business Area Analysis Activities 361

obligations, or is independent of all other processes, the history files will answer most of his questions. In
or is contingent on other processing. On the job, the his manual system, Vic purges the files once a year at
SE, with the analysis team, decides which method of tax time, but he says there is too much paper to look
defining inputs and outputs will be used, then is con- at any paper records unless a customer actually dis-
sistent in their definitions. A related issue is the putes a charge. In any case, Vic, the accountant, and
relationship of Print Receipt to the other processes. Mary jointly decide to purge the transaction files
Does it follow payment processing, does it follow monthly and move deleted records to an off-line
and confirm file creation and updating, or is it inde- archive file. This discussion causes a new activity
pendent? At the moment, printing appears related to to be added to the decomposition under Periodic
payment processing only, but here again is some- Processing.
thing we need to ask Vic. A similar problem arises Next, Mary broaches the subject of keeping track
with data entry procedures that we will discuss later. of file updates and printing the receipt only when the
Here is a sample dialogue between Mary and Vic file updates (or creates) are successful. Vic has two
to resolve the relationship issue. concerns. He needs the ability to fix a file problem
if one occurs, and he wants the ability independently
Mary: "We are trying to decide about when to
of the rental process. Second, he is leery about
print receipts and how receipts relate to the rest
using the receipt as notification of a problem. "If
of the process. Can you tell me the legal
users think there is a problem with the computer sys-
requirements and if you have any other
tem, they might not trust the information we give
business requirements?"
them about late fees and other charges." Vic decides
Vic: "Hm, now, we write down all the customer
that printing is independent of file updates and that
numbers, video numbers, amount paid, and rea-
an operator message should be displayed for errors
sons for each transaction. We don't really give
in writing to files.
customers a receipt in the manual system. I'm
The third issue is to evaluate the completeness of
not sure what the legal requirements are; I'll get
the processing defined. In particular, where are Cre-
the accountant in here, too."
ate Customer and Create Video when the 'valid'
The accountant comes in and is asked the same
items are not found in a database? From a simple
question. She says, "It would be nice to have a
evaluation of process names, the processing appears
paper copy of each transaction in which money
complete. To resolve the issue about the two create
is processed so I can locate errors when I do the
processes, we look specifically at those processes.
bookkeeping. Trying to find an error by query-
Again, there are two options for dealing with the
ing the computer might be longer than just
need to create customers and videos: It can be a sep-
adding up the days' receipts in different cate-
arate process or it can be a subprocess to the associ-
gories. It would also provide IRS documentation
ated Get Valid ... process. The question to answer is:
if you don't plan to do that on the computer.
How important, in the rent/return activity, are create
Do you?"
customer and video? The answer is that they are not
This leads to a discussion of the tax processing very important. They are performed on an excep-
possible and the potential costs to the project, which tion basis to allow processing continuity. Both pro-
are negligible at this stage. The final decision is to cesses are important to the related file maintenance
require receipts not only for transactions in which activity. A related issue is the name given to the
money is processed, but to offer a receipt as an processes--Get Valid Customer and Get Valid Video.
option to the customer for nonmoney transactions. The implication from these names is that both valid
The discussion then digresses into the issue of and invalid conditions are dealt with within the pro-
how long records must be kept on the rental file. If cedure; only valid customers and videos will be
all money-related transactions are printed, records of passed for further processing. A missing condi-
paid transactions could be deleted. Vic wants access tion would lead to the initiation of the create proce-
to transaction data for historical analysis but thinks dure. The resolution, then, is to leave the process
362 CHAPTER 9 Data-Oriented Analysis

Purchasing Rental/Return Personnel/


Accounting
Payroll

RenVReturn

Get
Customer ID

Get Valid
Customer

Get Customer
1 ----------------------------- 1

Data

Create New
Customer

heck Custome
Get Valid Credit
Video
Get Video and
1-------1 Copy Data

Create New
Video

FIGURE 9-25 Partial Decomposition with Details of Get Valid Processing

definitions as they are and to treat the Creates as sub- use the separate lists of processes again in the
processes under the associated Get Valid process. next activity, developing the process dependency
Figure 9-25 shows the details of the two get valid diagram.
processes for the next level of decomposition. To summarize, process decomposition can be per-
The final issue is to consolidate these four lists to formed independently of ERD development. This
develop one list, completing the decomposition dia- step concentrates on activities, processes, and sub-
gram. The consolidated list is shown, with sequence processes of all functions in the BAA. First, all
implied but without selection, in Figure 9-26, the activities are defined, then the processes for each
final decomposition diagram. The fourth activity, activity are identified and defined. Both activities
Periodic Processing, has been added. At the mo- and processes are defined without regard for current
ment, this activity includes archival, end-of-day, and organization, timing of processing, or current pro-
query processing. Other processes may be added as cedure. Emphasis is on processes and procedures
we continue through analysis and design. We will that are required to fulfill business obligations. The
Business Area Analysis Activities 363

Personnel/
Purchasing Accounting
Payroll

Customer Video Periodic


Rent/Return
Maintenance Maintenance Processing

Get Customer ID
Create Create Query
Get Valid Customer
Delete Delete End of Day
Get Valid Video

Get Return ID
Update Update End of Month
Add Return Date

Get Open Rentals


Query Query
Check Late Fees

Process Payment
& Make Chan e

Create Open Rental

Update Open Rental

Print Receipt

FIGURE 9-26 Completed Decomposition Diagram

final decomposition should be validated through decomposed, we examine the processes and se-
user review. quence them by order of occurrence: what happens
first, then second, and so on. A diagram using
rounded rectangles for each process and arrows to
Develop Process Dependency connect them shows the sequencing of the processes.
Processes that are independent of other processes are
Diagram placed on the diagram but not connected to anything.
Rules for Developing Process Dependency One diagram is created for each activity. The steps
for creating the process dependency diagram (PDD)
Diagram are as follows:
Process dependency relates processes and shows
cyclical, logical, and data connections between pro- 1. For each activity, draw the processes on a
cesses. For each activity and level of processes sheet of paper.
364 CHAPTER 9 Data-Oriented Analysis

Sequential Connectors: Iterative Connections:

Singular Connection
Get Open Rental1------t ► ( Get Return ID ) ···
(. _)--►( ) Until
No More
Open Rentals
Multiple Input Connections

Martin's Iterative Connections

@et Open Renta0)H...----1 ►.,_----1(Get Return ID ) ···

( )

FIGURE 9-27 Types of Process Dependency Connections

2. Examine each process to determine how it add the selection conditions under which
is initiated. For processes that pass data to processing takes place.
begin work, connect the process to its data 5. For all connected processes, examine
receivers. These connections depict the each to determine Boolean connections.
sequence of processing. Alter the diagram to include required
3. For all connected processes, examine each Boolean logic.
to determine the cardinality of execution. 6. Review all connections with the users to ver-
Define iterative processing and document it ify correctness.
on the diagram. Be careful to uncouple to the
maximum extent possible based on business The types of connections between processes in a
requirements. process dependency diagram differ from those of
4. For all connected processes, examine each to data flow diagrams discussed in Chapter 7. In pro-
determine selection in processing. For mutu- cess dependency, four types of connections are
ally exclusive processes, alter the diagram to allowed: sequence, iteration, selection, and Boolean
depict exclusivity. For all selected processes, (see Figure 9-27). All connections identify the data
Business Area Analysis Activities 365

Simple Selection Connections:

c ==:
P1 _)-..--. I
If A

►_c
If not A
P_2 --=-)= ... -------- ►
►I
Mutually Exclusive Selection Connections: If A
PA

else if B
P1 PB

else if C --------...
PC

else
PD

Boolean Connections:
Or process

( A ) ► 0 ( B )
( C ) 0 ► ( D )
Or process

F
E (And processes)

FIGURE 9-27 Types of Process Dependency Connections (Continued)

passing between processes by writing its name, Iterative connections between processes are
when known, above the line. shown with feedback loops, with an indication of
Sequential connections may be singular or multi- how many iterations are performed. A popular
ple, with many processes feeding another process, alternative is Martin's notation of iteration which
possibly feeding the same data (as in reusable uses cardinality indicators, i.e., crows' feet. This
processes) (see Figure 9-27). Multiple entries into notation implies a coupling between processes that
(or exits from) a single process do not imply any may not exist, so the decoupled, more standard iter-
relationship between the multiple processes. That ation loop is used in this text. Both Martin's nota-
is, no control structure is required to ensure correct tion and the decoupled notation are in Figure 9-27.
order of execution of the processes. In fact, multiple Selection, or conditional, connections show the
processes could be concurrent, if needed. alternative choices connected by a solid circle to
366 CHAPTER 9 Data-Oriented Analysis

differentiate Boolean processes. The if-then-else


logic conditions are written on each line. ( Create )

Boolean connections identify 'and' or 'or' types


of connections. Boolean connectors use connected
lines with an open circle at the junction for optional
(or) processes. Simple connected lines which join (or ( Delete ) ( Update )
split) to show multiple (' anded') entry (or exit) from
processes. That is, any processes not identified as
optional or selected are assumed to be executed fol-
lowing the preceding process.
A comment about multiple required process con- ( Retrieve )

nections is required. Two options for multiple pro-


cesses, one using multiple directed lines, and one
using multiple lines joining or splitting into one line, FIGURE 9-28 Maintenance Process
are discussed. These notations have specifically dif- Dependency Diagram
ferent connotations. The first, multiple directed lines,
shows that any or all of the multiple processes can be
executed and that control over that execution is process dependencies for each process alternative
imbedded in the processes. The second, multiple as we did above. The four choices, again, are rentals
lines joining or splitting into one line, specifically with and without returns, and returns with and with-
identifies 'anded' processes and may require logic to out rentals.
ensure that all are executed. The first diagram lists the processes for rentals
In addition to showing the logical connections without returns and, informally, draws connections
between processes, the lines connecting processes between them. We draw the informal diagram be-
identify process data triggers, that is, data flows from cause changes are expected and changing an infor-
a process to its dependent processes. The last step mal diagram is easier than changing a formal one.
to the dependency diagram is to identify, as much When you start considering the processes, two
as possible at this stage, the data that triggers the apparent features are: first, they are not all sequential
dependent processes. Attribute names, relation and second, they are not all done only once. Repeti-
names, or other identifier names are written on the tive processes are Get Open Rentals (with Check for
connective lines. Late Fees in an iterative loop), and Get Valid Videos.
Both of these are performed until there are no more
ABC Video Example Process Dependency
Diagram
The dependency diagrams for ABC vary in their ( Query )
complexity. The maintenance diagrams are simple
because all processes are independent (Figure 9-28).
Similarly, the periodic processes are also unrelated
(see Figure 9-29). The processes of rental and (End of Day)
return are complex and are discussed in detail.
The discussion in the preceding sections identi-
fied a dependency of processes in rental/return pro-
( End of Month)
cessing that we need to carry forward: Print Receipt
is dependent on Process Payment and Make Change.
There are other dependencies as well. To show FIGURE 9-29 Periodic Process Dependency
the logic behind the final diagram, we show the Diagram
Business Area Analysis Activities 367

field, as required. The video process gets Video IDs,


( Get Customer ID ) reads the Video and Copy relations, composes and
displays lines, and adds to a total field. Both pro-
cesses need access to the screen. So, we need a pro-
,, tocol, or set of rules, to govern where and when a
( Get Valid Customer) process can display information. They cannot both
try to use the same line. The easy method is to force
one process to be first and to create an artificial
( Get Open Rentals_J
dependency. This is what we will do: Get Open
C) Until No Rentals will be first, because we can also have the
More Open
Rentals
clerk verify late fees with the customer. So Get Valid
Videos will be dependent for screen location infor-
mation (and memory location information, too) on
FIGURE 9-30 Get Customer ID and Get Get Open Rentals.
Valid Customer Process Dependency Diagram
To continue, Get Valid Videos iterates until there
are no more videos to be rented, then proceeds to
Process Payment and Make Change (see Figure
of the items being got. Draw a circular line from the 9-32). We decided above that both Create Open
process to itself to show iteration. Is there any data Rental and Print Receipt are dependent on payment
passed from one iteration to the next? No specific processing but independent of each other, so we
data except an indicator to keep going and, maybe, draw two lines from Process Payment to each of
a memory address at which to store the next data, but these processes (see Figure 9-33). Putting all of these
this is an implementation detail. We do not identify dependencies together, we arrive at Figure 9-34.
it now. It is important to practice walking through the
Next, walk-through the processing to identify diagrams one step at a time to identify dependencies,
dependencies, drawing the appropriate connections considering each process alone and as possibly
as you proceed. Get Customer ID provides the exter-
nal display and entry processing and passes a Cus-
tomer ID to Get Valid Customer (see Figure 9-30).
We cannot go directly to any other process because
we only want to process valid customers. Conse- ( Get Open Rentals J
quently, the only dependency is Get Valid Customer.
-_::; Until No
More Open
Get Valid Customer retrieves a customer record, cre- Rentals
ating a new one if required, checks credit status, and
passes a valid customer record to the next process:
Get Open Rentals (see Figure 9-30). We already said ( Check Late Fees J
Get Open Rentals iterates until there are no more C _;> Until No
open rentals, and it proceeds to Get Valid Videos More Open
Rentals
after it is complete (see Figure 9-31). Could we go
directly from Get Valid Customer to Get Valid
Videos? That is, could Get Valid Videos and Get (GetValo
Open Rentals be concurrent? We need to jump into Until No
More Valid
implementation details again to decide, since there is Videos
no business reason why these processes cannot be
concurrent. What do we do in these processes? The
open rentals procedure reads a file, checks late fees, FIGURE 9-31 Get Open Rental and Check
composes and displays a line, and adds to a total for Late Fees Dependent Processes
368 CHAPTER 9 Data-Oriented Analysis

consolidate into one diagram-that is, a composite


Process Payment of the individual diagrams. We only discuss the dif-
& Make Chan e
ficult connections and connections that change the
Until No
way we think about the rent/return process (i.e., may
More Valid
Videos alter our mental model).
In Figure 9-35, we have several differences from
the first dependency diagram (Figure 9-34). First,
FIGURE 9-32 Get Valid Videos Dependent Get Valid Customer is only done for the first return,
Processes so we need a selection connector. If the Video ID
(or Open Rental) is not the first, we proceed to Add
Return Date and Check for Late Fees. We have two
connected to all other processes. Ask if all of these choices on the iteration grouping shown (see Figure
processes get done once, or are some iterated? 9-38). The first strategy shows coupled logic with
Can groups of processes that iterate together be the loop encompassing Get Request, Get Open
identified? Rentals, Get Valid Customer, Add Return Date, and
Draw each connection as you consider it so it is Check for Late Fees. The second strategy shows sev-
translated properly. Finally, identify the data triggers eral loops that may look more awkward, but reflect
when they are known so that you know what you required coupling for the processes. This logic is
don't know when your diagram is 'complete,' mean- uncoupled and shows three iterative loops, all iter-
ing it contains all known information. ating for all returns. The first loop is Get Open
Figure 9-34 shows the dependency diagram for Rentals. The second loop is Add Return Date; the
Rentals Without Returns. Try to develop the process third is Check for Late Fees. Both of these alterna-
dependency diagram for each of the options on your tives would be acceptable in program specifications
own, without looking at the answers. The other and selection for one over the other might be based
process option dependency diagrams are shown as on the common iteration pattern. At the logical
Figures 9-35-9-37. Keep in mind that iteration and requirement level, however, the preferred method is
sequencing required for each alternative way of pro- the more loosely coupled one because the iteration
cessing are important because we eventually must cycles may change when we consolidate the dia-

(/)
cii
"E
Q)

a:
C
Q)
C.
0

Update Open Rental

Until No Until No
More New More Open
Rentals Rentals

FIGURE 9-33 Process Payment and Make Change Dependent Processes


Business Area Analysis Activities 369

Get Customer ID

Get Valid Customer

Videos

Until No Until No
More New More Open
Rentals Rentals

FIGURE 9-34 Rentals without Returns Dependency Diagrams

grams. If the diagrams were already consolidated, from Get Customer ID so returns do not include the
we could go to the program design level of detail to selective execution of Get Valid Customer. Also
choose the iteration grouping. The more uncoupled notice that we again have coupling options for re-
dependency is shown in the completed diagram, Fig- turn processing (the coupling options for return pro-
ure 9-35. The decisions about preferred looping are cessing are shown in Figure 9-38). In the selected
deferred until design. option we have three iteration cycles. Get Open
The second difference in Figure 9-35 is that a Rentals is performed for all open rentals. Get
receipt has selection criteria applied to its creation. A Return IDs and Add Return Date are performed
receipt must be printed whenever a payment is made, together for all returns which may be a subset of
and may be printed upon request of a customer with open rentals. Check for Late Fees is performed for
returns but no payments. This selection is shown on all open rentals whether or not returned today. The
the diagram. final difference is for history processing which is
Figure 9-36 shows rentals with returns. In this selected for open rentals with Return Date equal to
procedure, we have two iterative cycles: one for today's date.
return processing and one for new rental-item The last procedure is for returns with rentals (see
processing. These, in effect, consolidate the previous Figure 9-37) which is similar to Figure 9-36 except
two diagrams. Notice here that the initial input is for the initial entry of information. If a return is first,
370 CHAPTER 9 Data-Oriented Analysis

Get Return ID

Until No
More Open
Rentals

GetRetur )
Until No
More
AddReturv Returns

Update/Create History
Until No
Until No
More Open
More
Rentals
Returns

Update Open Rental Print Receipt )

Until No
More New
Rentals

FIGURE 9-35 Returns Without Rentals Dependent Processes

Get Return ID is the first process and we need the change is reflected back to the decomposition dia-
selective execution of Get Valid Customer. gram also.
Now, we are ready to consolidate the diagrams Next, for returns, we need selective execution of
into one (see Figure 9-39). The obvious complexity Get Valid Customer. To consolidate, we need to
is in dealing with all of the return options, so they know whether we are processing a rental or a return.
will be done first. If we look at the first step of each Two changes are required. Get Request must call
procedure, the differences are that for returns, Video either Get Valid Customer or Get Open Rental,
IDs are entered first and for rentals, Customer IDs depending on the type of entry. This is indicated by
are entered first. If these are separate processes, we the selection logic in Figure 9-39. Second, Get
have a problem knowing which is, in fact, being Request has to pass some indicator to Get Open
executed. If we consolidate these processes, we can Rentals that it is the caller; this means data is trig-
use program logic to figure out which numbers are gering the process.
for videos and which for customers. This means that The last return issue is what to do with Check for
Get Return ID and Get Customer ID are replaced Late Fees. There are three options. First, include it in
with one process we will call Get Request. This both Get Open Rentals and Add Return Date to
process will select either Get Valid Customer or Get ensure complete processing of late fees for old and
Open Rentals depending on the data entered. This new returns. Second, leave it separate and execute it
Business Area Analysis Activities 371

Get Customer ID

Get Valid Customer

Get Return ID
Until No Until No
More Open More Returns
Rentals
Add Return Date
Until No
More Open
Rentals

Until No
More
Videos

Print Receipt )

Until No
More New More
Rentals Returns

FIGURE 9-36 Rentals with Returns Dependency Diagrams

for all open rentals, including those returned today, because there is no necessary connection between
as a separately iterated process. The first option any of the processes. It reflects the independence of
guarantees double processing for all returns when the processes, and is the basis for the PDFD which
rentals are also done. The second option requires completes the dependency diagram. This type of
somewhat complex logic for memory loop process- independence also identifies possible concurrent
ing. Both options are acceptable technically and processes and is considered a normal diagram.
from a business perspective. The last option Notice that even though these processes would be
is to defer a decision. Since we have no business connected on a menu for processing, no menu
basis for a decision, we leave the process on the selection options are shown at this logical level. The
diagram and defer any decision about grouping reason is that the business requires no menu.
until design. The final dependency diagram is shown To summarize, to develop the dependency dia-
in Figure 9-39 and reflects all of the decisions dis- gram list the processes for an activity, in sequence.
cussed above. Then, examine each process to determine its rela-
The dependency diagram for periodic activities tion to all other processes. If complex processing is
is in Figure 9-40. The diagram is somewhat strange involved, as we have here, separate out the options
372 CHAPTER 9 Data-Oriented Analysis

Get Return ID
Until No
More Open
Get Open Rentals Rentals
If First
L---...- Get Valid Customer

Get Return ID
Until No
More
Add Return Date
Returns

Check Late Fees Until No


More Open
Rentals

Until No
More Valid
Videos

Print Receipt )

Until No Until No
More New More
Rentals Returns

FIGURE 9-37 Returns With Rentals Dep ndent Processes

and develop dependency diagrams for eac]l opti,on.


Be careful to couple processes based on business
Develop Process Data Flow
requirements rather than on convenience. Conve- Diagram
nience is decided in design. Consolidate any options
and only change processes if required to support Rules for Developing Process Data Flow
integrated process interactions. · Diagram
Notice also that in going back to the client for
information during this procedure, we obtained This is a three step process:
information we would otherwise not have about the 1. For each process dependency diagram, exam-
need for periodic purging of the file aµd require- ine every process to determine if external
ments for IRS documentation. events provide information used in the execu-
Business Area Analysis Activities 373

Tightly Coupled Alternative: Until No


Get Open Rentals ------------------------
More Open
Rentals

Get Return ID

Add Return Date

No More
Open Rentals

Loosely Coupled Alternative (Preferred):

Until No
More Open
Rentals

Get Return ID
Until No
More
1 ----- , Add Return Date Returns

Until No
More Open
Rentals

FIGURE 9-38 Alternative Coupling Strategies in Return Processing

tion of the work. For each external event, add 3. Review the triggers and files with the user to
an event trigger and identify the event (or the verify correctness.
data it provides).
2. For entities from the ERD, examine their use Using the process dependency diagram, first add
by processes in each diagram. For known the information about triggers, that is, the data
connections, add one file for each entity to or events that trigger each process. If arrival of
the diagram and connect them to processes information from another process is the trigger,
with arrows depicting the direction of data identify the data on the lines connecting the rec-
flow. For all files, when a relation is not the tangles. Use large arrow outlines for event triggers.
unit of data retrieved, list the attributes that Use single-directed lines for data triggers (see Fig-
make up the data flow. ure 9-41).
374 CHAPTER 9 Data-Oriented Analysis

If Video ID

Until No If First
More Open
Rentals
If Returns
Get Return ID
Until No
More
Add Return Date
Returns

Until No
More Open
Rentals

Until No
More Valid
Videos

Print Receipt )

Until No Until No
More New More
Rentals Returns

FIGURE 9-39 Consolidated Process Dependency Diagram

Each process must be triggered, or initiated, by


either an event or arrival of data. If you have a pro-
( Query ) cess without either data or event as input, then you
have missed information during data gathering and
should return to the user to obtain the information.
( EOD Process ) Identifiers for both data and events should link
directly to some entity. The trigger may be the
arrival of some entity or may be some partial data
from an entity. If the identified data does not map
( EOM Process )
directly to an entity from the ERD, you are also
missing information and should return to the user to
obtain the information.
FIGURE 9-40 Periodic Activitied Next, data files are identified, if they are known.
Dependency Diagram Not all files are necessarily identified at this point of
Business Area Analysis Activities 375

are integrated into one diagram at the end of the


discussion.
Event Trigger The first process, Get Request, requires input of
either a phone number or a video ID to begin exe-
cution. The information is provided by the customer
and entered into the computer (either by scanning
or typing) by the clerk. Since the information is
Data Trigger
externally generated by a rental or return request, the
data being entered is an event. That is, arrival of a
Customer ID or Video ID into the computer triggers
FIGURE 9-41 Trigger Identification on
the Get Request process which begins the sequence
Process Data Flow Diagram
of processes for rental/return processing. The hollow
arrow is added to the diagram to show the arrival of
the Request event (see Figure 9-42).
the analysis. However, most information that is After the request is entered, the process deter-
required in persistent files will have been identified mines which data were entered and passes control
as entities on the ERD. The files are connected to to the appropriate process. If the Customer ID was
processes with the appropriate arrow signifying the entered, the Get Valid Customer process would be
direction of data flow. If a unit of data other than a triggered. For that process, customer information
logical relation is required, the lines connecting files from storage is required for validation and credit
should be labeled with their contents. checking. A file symbol for a customer information
PDFD validation is performed last to guarantee file with a line indicating data into the process is
that all functional requirements are satisfied by the added to the diagram (see Figure 9-42). Since there
processes depicted. The validation walk-through is a possibility that the customer is new, an arrow
uses both the original text or functional specification, going to the Customer File is also shown.
plus the decomposition from the specification, plus Next in rental processing, the Open Rentals File
any additional user requirements or information should be read to retrieve all information about Open
obtained throughout the analysis activities. Rentals relating to the present customer. These are
formatted and displayed. The file is added as input to
ABC Video Example Process Data Flow the Get Open Rentals process (see Figure 9-42).
Diagram If the request entered had been a Video ID, the
Get Open Rental process followed by the Get Valid
To complete the ABC PDFD, begin with the final Customer process would have been triggered. The
process dependency diagram. We examine each pro- control of these processes is shown by the selection
cess sequentially, adding events and data files as arrows from the dependency diagram. The data and
needed to complete the logical processing. For each trigger requirements do not change. We might make
process, ask: How does this process know to exe- a note that, in this execution of Get Valid Customer,
cute? What information does it need? Where does we do not allow new customers to be added. That
the information come from? Ask these questions is, it should be logically impossible for a new cus-
without paying attention to current connections from tomer to have a return.
other processes. For each process, when you have Return processing takes place next with two pos-
the answers, look at the current connections and sible variations. First, if the first Request was a Video
decide if they completely define the required list of ID, there already is a return Video ID in memory and
information. If not, define the external 'triggers'- no Get Return ID is triggered. Instead, Add Return
either data or events-that initiate the processing. Date/Late Fees is triggered. The second variation is
The individual chunks of the diagram on which we in the rental process; returns are entered after open
are working are shown with the discussion. They rentals are displayed. The Get Return ID process is
376 CHAPTER 9 Data-Oriented Analysis

Until No
More Open
Rentals

Until No
More
Add Return Date
Returns

Until No
More Open
Rentals

FIGURE 9-42 Process Request 'Chunk' of PDFD

triggered but it now needs the Video ID, external 9-43). The formula used is Total Amount Due - Cus-
information, to process. The event trigger added to tomer Payment Amount = Balance. When the Bal-
the process, then, contains Video IDs (see Figure 9- ance is zero, the rental/return process is complete
42). The data is made available to the Add Return and all files may be updated as required. Each line of
Date process. Get Return ID and Add Return Date the rental/return, signifying either an existing Open
iterate until the Return ID is ended (exactly how is Rental with/without Return Date or a new Open
decided during design). Then all Open Rentals (and Rental is processed separately to determine the next
returns) are Checked for Late Fees. process to execute. This represents the normal pro-
Next, the Get Valid Video process executes to cess; now we must also think about exceptions:
identify videos requested for rental. The informa- What if the balance does not go to zero? Can a cus-
tion needed for this process comes from an external tomer ever overpay and leave so fast that they are
trigger, the customer-supplied Video ID. The ID is owed change? Can a customer ever owe money and
validated by reading the Video File and a Copy File. leave without paying? If the answer to either of these
For rental/return processing, the Video and Copy questions is yes, we also need an optional event trig-
files are always used together, so they are shown in ger End of Payment that forces completion of the
one file symbol. By doing this, we are reminded that Process Payment process and shows that the cus-
we need a user view that connects the two relations tomer is owed money. For the present, we assume
for rental processing. Customers are to be reminded that we iterate through Process Payment until Bal-
when they have already rented a particular video, ance equals zero. Finally, process payment needs to
therefore, Customer History File is also read during provide information for End of Day totals. A file for
this process. Its file symbol is added to the diagram. EOD data will be created from this process. Notice
The Total Amount Due is passed to trigger Pro- that this file is not on the ERD, but should it be? It
cess Payment and Make Change. The Total Amount does not represent an entity that the company keeps
Due is displayed from the previous process and information about, or does it? When the ERD was
awaits the external entry of Customer Payment developed, we focused on the rent/return processes
Amount to compute change. This requires an event only and ignored nonrental activities. By ignoring
trigger for Customer Payment Amount (see Figure accounting and its needs for rent/return data, we
Business Area Analysis Activities 377

Customer History

, Video, Copy
---....---,,----===--'

End of Day

FIGURE 9-43 Rental and Payment 'Chunk' of PDFD

missed the entity for financial information relating to null), the Open Rental is rewritten to the file (see
rent/return. We should recheck with the accountant, Figure 9-44). For each paid returned video, some
but it appears that the EOD Accounting Information logical delete indicator must be set and the Open
should be an entity that is added to the ERO, con- Rental is then rewritten to the file. If an existing
nected to the Open Rental entity. Open Rental had no processing, no action is re-
The last 'chunk' of the PDFD is for file update quired, but it might be easier, and more consistent, to
and print processes. For each new rental, Create only look at return and paid criteria to determine
Open Rental writes the new rental to tpe Open correct writing. No business criteria exist for this
Rental File (see Figure 9-44). For each unpaid return option, therefore, this is a design decision not
(i.e., existing Open Rental with Return Date not made here.

1 -------- End of Day

Copy

FIGURE 9-44 File and Update 'Chunk' of PDFD


378 CHAPTER 9 Data-Oriented Analysis

Until No
More
Add Return Date
Returns

... ...,....,,l4 ---------------------------l Video, Copy


Until No
More Valid
Videos
End of Day

Cre

Copy

FIGURE 9-45 Consolidated Process Dependency Diagram

Next, history file processing updates both Video them yourself. The remaining PDFDs are shown as
History and Customer History. Notice that the de- Figure 9-46, for query processing, and Figure 9-47
tails of history processing require another level of for customer maintenance processing. The PDFDs
decomposition, which is left as a student exercise. for Video Maintenance processing are a practice
Last, the receipt is printed. The data trigger from exercise at the end of the chapter.
Process Payment initiates this process; the physical Next we evaluate the PDFD for completeness
output is not on the PDFD. based on the decomposition information from the
The composite PDFD with all of the chunks client and the original statement of the problem
integrated is shown as Figure 9-45. Before you look (Chapter 2).
at the other diagrams, try to develop one or all of Errors to watch for are:
Business Area Analysis Activities 379

1. Processes on the decomposition that are user if necessary, to determine what data are
not self-contained are not processes. For required for the dependent process.
instance, 'end process' is a system action, 4. If a process data trigger exists in a different
not a business process. You do not need a time, the connection is probably wrong. For
process to which all other processes feed to instance, you might be tempted to connect
show a termination point on a PDFD (see query processing to rental/return in some way
Figure 9-48). (see Figure 9-50). These are disjoint activi-
2. Processes on the PDFD that are not identical ties and the only connection is through
to the processes on the decomposition (see the database.
Figure 9-49). 5. For query processing, do not try to simulate a
3. If process data trigger contents cannot be menu selection process in the PDFD (see
identified, there may be no dependency. Figure 9-51). Each type of query has its own
Reevaluate the relationship, talking to the event trigger requesting information. Each

Customer
Customer History

Video

Copy
Video History

EODArchive

EOD Process

EOD

Open Rental Archive

EOM Process

Open Rental

FIGURE 9-46 Periodic Activitied PDFD


380 CHAPTER 9 Data-Oriented Analysis

Add Customer

Update Customer

Delete Customer

Query Customer

FIGURE 9-47 ABC Customer Maintenance PDFD

type of query is distinct and separate from all


Print eceipt other queries. The queries may share files.
6. When more thari one activity is shown on a
PDFD, problems are encouraged and the dia-
gram no longer clearly delineates any process
Terminate
(see Figure 9-52). Place at most one activity
decomposition on a page. Use one side of the
FIGURE 9-48 Nonprocess Problem paper only. Keep in mind that most of the
time, the information will be on a CASE tool
until printed for documentation, so there is
not really much wasted paper.

( Get Request )

versus

Process Payment ------------------------------- Query Customer


( Do Data Entry )

FIGURE 9-49 Name Names Do Not Match FIGURE 9-50 Data Trigger Timing
Decomposition Problem
Business Area Analysis Activities 381

( Main Menu )

If Periodic
1r
( Periodic Menu 1
t
( Query Customer (
t-
Que ry Video J ( t
Query Rentals )
'
(,,_E_n_d_o_fD_,a_y_P-ro-c-'-e-ss-)

FIGURE 9-51 Simulated Menu Problem

Develop and Analyze may be one to five for a small application, such as
ABC, or seven or more for a large application.
Entity/Process Matrix To perform manual affinity analysis, perform the
following procedure (here we do create affinity
Rules for Developing and Analyzing an
only). Keep in mind that you are 'normalizing'
Entity/Process Matrix process-entity relationships. Look at each process
This matrix is composed of the results from the ERD and its entities. For an entity/process cell, look down
and process decompositions; it requires neither the the column and identify other cells in which create
process dependency nor the PDFD for completion. processing is done (C). Make an erasable, colored
Along the left margin, list each lowest-level process mark in those cells. Do this for all entities for
from the process decomposition diagram. Use the each process.
lowest-level processes, such that all elemental pro- Even though it is an extra step, and quite a bit of
cesses for the organization and application area are work, create an interim matrix for each potential
present. Along the top, list the normalized entities cluster. This interim matrix makes your visual
from the ERD, with one entity in each column. inspection of relationships easier and actually speeds
Completely identify which processes are allowed the affinity analysis. Iterating, build the interim
to Create, Retrieve, Update, and Delete (CRUD) matrix, analyze it as described below, and add the
each entity. Enter one or more of the letters as resulting cluster(s) to the new process/entity matrix.
allowed by the current organization's policies and Iteration is required because the interim clusters may
procedures for each entity. change as the relationships of each potential cluster
When the matrix is complete, entities are grouped are analyzed.
by their affinity, or closeness, in processing entities. To analyze a potential cluster, start at the first
If you do this step manually, group processes that process and look at the data it shares with the next
share create responsibility first. If the number of process in the list. Do these two processes share
clusters is reasonable for the size of the project, stop. 80%7 or more of their data creation (or update,
When you have analyzed the entire matrix, rearrange delete) responsibility? If yes, mark the original
the matrix by its clusters. You may have several clus- matrix to show they are together and add the pro-
ters that overlap. That is normal and not a cause for cesses and their entities to the interim matrix. If the
worry. If you have only one cluster, reanalyze as nec- percentage is less than 80%, circle the second
essary using first update processing, then delete pro-
cessing, then retrieval, as the clustering criteria. 7 80% is not a hard number. You adjust the percentage affinity
When you obtain a reasonable number of clusters, go needed to find multiple clusters. If all processes share all
responsibilities, the organizational processes must first be
to the next step of the analysis. A reasonable number
redesigned, then this analysis is repeated.
382 CHAPTER 9 Data-Oriented Analysis

Customer History

Video

Add Customer

Separate
page

Update Customer

EODArchive

Delete Customer

$ EOD Process

FIGURE 9-52 Combined Process Problem

process for potential deletion from this cluster. If moment. Continue to do this type of stepwise com-
the percentage affinity is between 50-80%, look at parison of processes using entity affiliation to deter-
the next process that might be related. Do either of mine process affinity. Each successive process's
the two first processes share more than 80% of their functions on the entity are compared to all previous
data with the third process? If all three share, clus- processes, not just the first. If a new process is
ter them all. If the third strongly relates to the second strongly related to all of them, the cluster remains
process but not the first, or the third relates to the first intact. If the new process strongly relates to some
but not the second, still cluster all of them for the subset of processes, keep it. If the new process
Business Area Analysis Activities 383

strongly relates to only one process, consider those First, we check each entity to see if all possible
two processes as a second cluster and set them aside processing is accounted for. Customer, Copy, and
(i.e., create a new interim matrix) with their data for Video all have CRUD processing and appear com-
analysis of that cluster. As you complete analysis of plete. Open Rental has CRUD processing during
a cluster, add it to the new process/entity matrix. rent/return and R processing as part of Query. Open
Return to the original matrix and draw a line through Rental, too, looks complete.
each process that has been added to a cluster, to EOD Financial Information is created but not
ensure that there is no replication of a process and ever deleted, which is wrong. It should be archived
to ensure that processes that are not currently in a or deleted at the end of the processing day. We will
cluster are added to a cluster eventually. assume archival at the moment and add both process
As you create the new process/entity matrix, and data changes back to all other diagrams as
leave several lines and columns of space between needed. We can further assume that the delete
each cluster. At the end of the analysis, reanal- process and create process follow. This is an exam-
yze processes that have not been assigned to any ple of what happens with late identified entities. The
cluster. Look at the interim matrices to which each processing is not as thoroughly analyzed and some
odd process was compared. Find the cluster to which information could 'fall through the cracks.' The
it has the most affinity, and add the process to entity/process matrix helps assure that processing
that cluster. If there is no affinity, leave the entity is completely defined.
separate. Finally, history is only created and retrieved. We
When affinity analysis is complete, the clustered have not yet defined history, so the decision may not
processes are ready for analysis to determine if they be final. In general, history files are only created and
can be in the same execution unit, and the data retrieved. They are permanent records of past trans-
shared by a cluster should be analyzed to determine actions or business states, so they can not be updated
the physical design of the database and the needed or deleted and still be known as 'history.'
user views of data. These activities are done during When the matrix is complete, we cluster the
the design phase. processes by their entity affinity (see Table 9-6).
There are five possible clusters, but most of the data
ABC Video Example Entity/Process are used by many of the processes. So, the cluster-
ing shown is to give an example of how, at the
Matrix
application level, affinity analysis can be used to de-
To develop the entity/process matrix, list the lowest termine user views for DBMS access. For ABC, be-
level processes from the decomposition diagram cause of the extensive retrieval activities, one subject
down the left column. Then, list the entities across database would be defined. EOD data are kept sepa-
the top, one per column. For each process, add which rate from all other data. Customer, Video, Copy, and
functions it has for each entity. Possible functions Open Rental data are all used to create individual
are create, retrieval, update, or delete (CRUD, relations and joint user views.
respectively). The ABC process-entity matrix is First we analyze organizational sufficiency as it
shown as first completed in Table 9-5. In completing relates to processes. Is each entity created by one
the table refer back to the PDFD. Use the arrows and process only? The answer here is yes. Do all pro-
names of the processes to identify the type of pro- cesses creating, updating, and deleting an entity
cessing. For entities with arrows only going into a report to the same manager? Here the answer is
process, the correct code is 'R,' for retrieval. For again, yes. So the organization is sufficient.
entities with arrows only going out of a process, the Next we look at the entities and their usage to
correct codes are 'C,' 'U,' or 'D,' for create, update, determine subject area databases. Again, ABC is
or delete, depending on the processing to take place. a small company, so the data are mostly in one
For example, Create Video has a 'C' under Copy and
a 'C' under Video because it creates both. (Text continues on page 386)
384 CHAPTER 9 Data-Oriented Analysis

TABLE 9-5 ABC Video Process/Entity Matrix


Entities= Open Customer Video Rental
Processes Customer Video Copy Rental History History Archive EOD

Get Request R

Get Valid Customer R

Get Open Rentals R R R

Add Return Date

Check for Late Fees

Get Valid Videos R R R

Process Payment and


Make Change u
Create Open Rental C

Update Open Rental u


Update/Create cu
History

Print Receipt

Query Customer R R R

Query Rental R R R R R

Query Video R R R R

Query History R R R R R R R

Query EOD R

EOD Processing CRD

Rental Archive D C

Processing

Create Customer C

Update Customer u
Delete Customer D

Create Video/Copy C C

Update Video/Copy u u
Delete Video/Copy D D
Business Area Analysis Activities 385

TABLE 9-6 ABC Video Process/Entity Matrix Affinity Clusters


Entities= Open Customer Video Rental
Processes Customer Video Copy Rental History History Archive EOD
Create Customer C

Delete Customer D

Get Valid Customer R

Query Customer R R R

Update Customer u
Create Video/Copy C C

Update Video/Copy u u
Delete Video/Copy D D

Get Open Rentals R R R

Get Valid Videos R R R

Query History R R R R R R R

Query Video R R R R

Create Open Rental C

Update Open Rental u


Query Rental R R R R R

Rental Archive D C

Processing
cu
Update/Create
I cu I
History

Process Payment and


Make Change u
BOD Processing CRD

Query BOD R

Add Return Date

Check for Late Fees

Get Request

Print Receipt
386 CHAPTER 9 Data-Oriented Analysis

Data Entities and Final Attributes Activities for Rental/Return and All Processes

Entity Attributes (Key underlined) Activity Processes

Customer Customer Phone ID Rent/Return Get Request


Customer Name Get Valid Customer
Customer Address Get Open Rentals
Customer City Add Return Date
Customer State Check for Late Fees
Customer Zip Get Valid Videos
Customer Credit Card Process Payment and Make
Number Change
Credit Card Type Create Open Rental
Credit Card Expiration Date Update Open Rental
Update/Create History
Open Rental Customer Phone ID
Print Receipt
Video ID
Copy ID Periodic Processing Query Customer
Rental Date Query Rental
Return Date Query Video
Late Fee Due Query History
LF Paid Query EOD
Rental Fees Due EOD Processing
RF Pd Rental Archive Processing
Other Fees Due
Customer Maintenance Create Customer
OF Paid
Update Customer
Video Video ID Delete Customer
Video Name
Video Maintenance Create Video/Copy
Entry Date
Update Video/Copy
Rental Rate
Delete Video/Copy
Copy Video ID
Copy ID Deferred Items for Decision During Design
Date Received
Item Decision
Status

Customer History To Be Defined Check for Late Fees Separate or Consolidated


with either/or both
Video History To Be Defined Get Open Rentals
EOD To Be Defined Add Return Date

Rental Archive To Be Defined History Is video history updating


going to be done to a history
file or to the current Copy
relations? This requires
monthly update. The history
file requires further decisions
about what is on the file.

FIGURE 9-53 Summary Repository Entries

database. Video, Customer, Open Rental, and End torical information could be stored in a separate
of Day information will be stored together. Video database or set of files. In most companies and ap-
and Customer are separate from the other entities plications, history files are kept separate from the
because they are only modified by one process. His- other databases and files. For applications with huge
References 387

amounts of data, history is even on a different stor- SUMMARY


age medium. History is frequently kept on tape and
the current databases are on disk. Depending on vol- Data-oriented methodologies are based on the notion
ume, we would consider tape storage for history that data are more stable than processes in business.
here, too. Organizations and procedures change regularly; the
The entity/process matrix analysis completes the data on which they work does not. Data-oriented
BAA. At this time, all entities, processes, attributes, methodologies, then, concentrate on data as the ini-
and their interrelationships should be known based tial focus of study. The theory underlying data meth-
on business requirements. All information is docu- ods applies semantic modeling to data and system
mented in a repository for use in the next phase. The theory to business functions.
repository entries, without details, are presented in Information Engineering's business area analysis
Figure 9-53. (BAA) is the example of data-oriented methodol-
ogy described here. BAAs begin with an entity-
relationship diagram that is fully identified and nor-
SOFTWARE ------------ malized. Business functions are decomposed to cre-
ate process decomposition, process dependency, and
SUPPORT FOR ----------
process data flow diagrams.
DAAT-0 RIENTED -------- Business processes from the decomposition are
ANALYSIS ------------- coupled to the entities from the ERD to form an
entity/process matrix, also called a CRUD matrix
There are many CASE tools that support data mod- (for create-retrieve-update-delete). The CRUD ma-
eling and other data-oriented analysis tasks. Tools trix defines responsibility for actions on each entity
that also support Information Engineering are inte- for each process. Affinity analysis of the CRUD
grated toolsets that cover the complete development matrix clusters processes and data into groups. The
life cycle. CASE support for Information Engineer- affinity groupings are used to decide the need for
ing is the best of any methodology. Two CASE additional project scoping, future applications, and
environments support the entire IE life cycle from alternatives for subject database design. All infor-
enterprise analysis through maintenance. The two mation from the BAA is documented in a repository.
tools are IEF™8 and ADW. The CASE tools are by
no means perfect, however; interphase linkages are
REFERENCES
weak; numerous bugs plague new releases of ADW;
and old releases of IEF were designed so rigidly that Date, C. J., An Introduction to Database Systems, Vol. 1,
all graphical and definitional forms were required to 5th edition. Reading, MA: Addison-Wesley, 1990.
use the tool effectively. The positive aspect of both Finkelstein, Clive, An Introduction to Information Engi-
tools is that they can feed code generators that can neering: From Strategic Planning to Information Sys-
automate development of as much as 70% of the tems. Reading, MA: Addison-Wesley, 1989.
necessary program code. Both ADW and IEF sup- Knowledgeware, Inc., Information Engineering Work-
port all of the graphical and definitional forms dis- bench™/Analysis Workstation, ESP Release 4.0.
Atlanta, GA: Knowledgeware, Inc., 1987.
cussed in this chapter. The list in Table 9-7 includes
Loucopoulos, Pericles, and Roberto Zicari, Conceptual
many other CASE tools that support some, but not
Modeling, Databases and CASE: An Integrated View
all, graphical, documentation, or mental models of of IS Development. NY: John Wiley & Sons, 1992.
IE and data-oriented analysis. Martin, James, Information Engineering: Book 2, Plan-
ning and Analysis. Englewood Cliffs, NJ: Prentice-
Hall, Inc., 1991.
8 IEF™ is a trademark of the Texas Instruments Co., Dallas, Martin, James, and Carma McClure, Diagramming Tech-
TX. ADW™ is a trademark of Knowledgeware, Inc., Atlanta, niques for Analysts and Programmers. Englewood
GA. Cliffs, NJ: Prentice-Hall, Inc., 1985.
388 CHAPTER 9 Data-Oriented Analysis

TABLE 9-7 Data-Oriented Analysis CASE Support


Product Company Technique

Analyst/Designer Toolkit Yourdon, Inc. Entity-Relationship


NewYork,NY Diagram (ERD)
Anatool Advanced Logical SW ERD
Beverly Hills, CA
Bachman Bachman Info Systems BachmanERD
Cambridge, MA
CorVision Cortex Corp. ERD
Waltham, MA
Deft Deft ERD
Ontario, Canada
Design/1 Arthur Anderson, Inc. ERD
Chicago, IL
ER-Designer Chen & Assoc. ERD
Baton Rouge, LA
Excelerator Index Tech. ERD
Cambridge, MA
IEF Texas Instruments Functional Decomposition
Dallas, TX ERD
Entity Hierarchy
Process Hierarchy
Process Dependency
Process Data Flow Diagram
Entity/Process Matrix
IEW,ADW Knowledgeware Functional Decomposition
Atlanta, GA ERD
Entity/Process Matrix

Texas Instruments, A Guide to Information Engineer- elementary process optional relationship


ing Using the IEF. Dallas, TX: Texas Instruments, entity process data flow diagram
1988. entity-relationship diagram (PDFD)
(ERD) process data trigger
KEY TERMS entity type process dependency
entity/process matrix diagram
activity business function entity structure analysis process relationship
affinity business process event trigger relational database theory
affinity analysis business redesign functional decomposition relationship
architectures cardinality fundamental entity relationship entity
associative entity CRUD matrix instance required relationship
attribute data administration many-to-many relationship subject area database
attributive entity data trigger normalization tabular method of
business area analysis direct method of one-to-many relationship normalization
(BM) normalization one-to-one relationship trigger
Study Questions 389

TABLE 9-7 Data-Oriented Analysis CASE Support (Continued)


Product Company Technique

Maestro SoftLab ERD


San Francisco, CA
Multi-Cam AGS Mgmt Systems ERD
King of Prussia, PA
ProKitWorkbench McDonnell Douglas ERD
St. Louis, MO
SW Thru Pictures Interactive Development Environments ERD
San Francisco, CA
System Engineer LBMS ERD
Houston, TX Entity Life History Diagram
Teamwork CADRE Tech., Inc. ERD
Providence, RI
Telon Pansophic Systems, Inc. ERD
Lisle, IL

The Developer ASYST Technology, Inc. ERD


Naperville, IL Organization Chart
Operations Process Diagram
Matrix Diagram
vs Designer Visual Software Inc Process Flow Diagram
Santa Clara, CA

EXERCISES associative entity m:n relationship


CRUD matrix normalization
1. Complete the PDFD for Video Maintenance. elementary process possible number of
2. The Get Valid Video process has as its sub- entity entity relationships
processes: Get Video Data, Create Video File, entity-relationship possible nature of
and feeds into the Check Previous Rental diagram entity relationships
process. Do a process dependency diagram for functional promoted relationship
these subprocesses. Then add event triggers and decomposition trigger
data files to complete the PDFD. 2. Compare data flow diagrams from Chapter 7 to
process data flow diagrams in this chapter. List
STUDY QUESTIONS _ five similarities and five differences between
them.
1. Define the following terms: 3. Find a small company and develop an entity-
affinity attributive entity relationship diagram of their data. For each
390 CHAPTER 9 Data-Oriented Analysis

entity, develop an attribute list and normalize 17. What are the steps to developing a PDFD?
the data. Discuss the problems you have in 18. Define the allowable inputs to a process on a
developing the answer with your class. PDFD.
4. What is a 'promoted relationship' in an ERD 19. What is a CRUD matrix? How is it used?
and what is the result of the promotion? 20. What are the allowable connections on a
5. Normalization assumes that you know the rela- process dependency diagram?
tionships of data within and between entities. 21. What are the allowable connections on a
What happens if you do not have the data rela- process data flow diagram?
tionships correctly specified in normalization? 22. List four problems and their solutions when

*
6. What does normalization, as performed during developing a PDFD.
analysis, define? What does it not define?
7. What is the purpose of an entity/process EXTRA-CREDIT QUESTIONS
matrix?
1. Develop an IE analysis for the accounting (or
8. Describe the analysis of an entity/process
purchasing) function at ABC Video. Refer to
matrix.
other books to obtain details about accounting
9. What is the significance of subject area data-
applications. One such book is Online Business
bases? What do subject area databases have in
Computer Applications, 3rd edition, Alan L.
common with normalization?
Eliason, NY: MacMillan, 1991.
10. What is the importance of an organizational
2. Compare IE to process analysis. What are the
ERD? What problems might arise when you
similarities? What are the differences? How are
begin the ERD definition for an application
the same terms used differently? Which method
during the business area analysis?
has the least ambiguity? Which method results
11. Describe the relationships between the dia-
in a more complete analysis?
grams developed throughout IE-BAA. That is,
3. Do an entity-relationship diagram for the AOS
how is each diagram used in the creation of
Tracking System problem in the Appendix. Nor-
successor diagrams?
malize the data. Compile a list of issues for
12. What is the purpose of functional decom-
future resolution dealing with the data. The
position?
issues should relate to how many relations are
13. What are the three conditions under which you
needed, how the data will be used, and how to
cannot eliminate an entity?
minimize the number of relations without hav-
14. On a process dependency diagram, what is the
ing many unused attributes in each relation.
significance of directed lines connecting two
4. Do a process decomposition diagram and a
processes? Does this meaning change when
PDFD for the AOS Tracking System described
the processes are connected on a PDFD? If
in the Appendix.
so, how?
5. What do you not know after BAA is complete?
15. When should printed items be included on a
PDFD?
16. What is a functional decomposition in IE?
Define the diagram and the contents at each
level of detail. How do you know when the
decomposition is complete, i.e., when to stop?

You might also like