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

Module8 New

This document provides an overview of process decomposition, database design, entity relationship diagrams, and data dictionaries. It discusses how to break down large processes into smaller sub-processes to improve understanding. It also explains how a database can provide different views of data depending on user needs through entity relationship diagrams and how a data dictionary documents the data flows, structures, elements and stores used in a system.

Uploaded by

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

Module8 New

This document provides an overview of process decomposition, database design, entity relationship diagrams, and data dictionaries. It discusses how to break down large processes into smaller sub-processes to improve understanding. It also explains how a database can provide different views of data depending on user needs through entity relationship diagrams and how a data dictionary documents the data flows, structures, elements and stores used in a system.

Uploaded by

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

MODULE 8:

PROCESS AND Dr. Tuan Truong

DATABASE
DESIGN
CONTENT
- Process Decomposition
- Database design
Database and Entity Relationship Diagram(ERD)
Data dictionary
PROCESS
DECOMPOSI
TION
PROCESS DECOMPOSITION
An activity in a process can be decomposed into a “sub-process”

Expanded Sub-process

Collapsed
Task
Sub-process

Activities

Use this feature to:


1. Improve understanding by breaking down large models
2. Identify parts that should be:
 repeated
 executed multiple times in parallel
 interrupted, or
 compensated 4
EXAMPLE: SUB-PROCESS
Invoice Process Process
received Invoice Payment

Process Invoice
no
mismatches

Enter Invoice /
Check Invoice
Credit Note
Mismatches
Details

mismatch
exists
Block Invoice

5
IDENTIFY POSSIBLE SUB-
PROCESSES
Acquire raw materials

6
Ship and invoice
SOLUTION

7
THE REFACTORED MODEL

8
Identify suitable sub-processes
in the process for assessing loan
applications model.
Once a loan application is
received by the loan provider,
and before proceeding with its
assessment, the application
itself needs to be checked for
completeness. If the application
is incomplete, it is returned to
the applicant, so that they can
fill out the missing information

EXERCISE 8.1 and send it back to the loan


provider. This process is
repeated until the application is
found complete.
IMPOSING ORDER OF MESSAGES VIA SUBPROCESS
The expanded subprocess for “Activity”

10
EXAMPLE: MODELLING PROCESS
HIERARCHIES
Process Receive and
Level 3 Inquiry and Validate ...
Quote Order

Level 4 Enter Order Check Credit ...


Order
received

Clear Order
Credit
Level 5 Check Credit
Record
available
...
Contact
customer
Credit not
available
account rep.

(Fragment of the SCOR reference model)

11
VALUE CHAIN
MODELLING
Chain of (high-level) processes an organization performs in order to achieve a business
goal, e.g. deliver a product or service to the market.

Business
process

“is predecessor of”

12
LINKING VALUE CHAINS WITH
PROCESS MODELS
Process model
for this
process is
available

13
WHY DATABASE?
What problems of traditional data storage/ Why we have to use database?
What are limitations of excel?
TRADITIONAL FILE PROCESSING

The use of a traditional


approach to file processing
encourages each functional
area in a corporation to
develop specialized
applications. Each
application requires a unique
data file that is likely to be a
subset of the master file.
These subsets of the master
file lead to data redundancy
and inconsistency,
processing inflexibility, and
wasted storage resources.
HUMAN RESOURCES DATABASE WITH MULTIPLE VIEWS

FIGURE 6-3 A single human resources database provides many different views of data, depending on the information
requirements of the user. Illustrated here are two possible views, one of interest to a benefits specialist and one
of interest to a member of the company’s payroll department.
C R U D MATRIX
is a visual representation that helps define the basic
operations or actions that can be performed on data
The acronym C R U D is often used for
 Create
 Read
 Update
 Delete
is a useful tool for defining and documenting access
permissions and data management capabilities in a
software application, which is crucial for security, role-
based access control, and system design. It ensures that
data can be managed and manipulated appropriately,
according to the needs and roles of users or components
within the system.
CRUD
MATRIX
A CRUD matrix typically takes the
form of a table or a matrix, where the
rows represent different data entities or
objects, and the columns represent the
CRUD operations. Each cell in the
matrix specifies whether a particular
operation is allowed for a specific data
entity. The matrix might use symbols
like "C" for Create, "R" for Read, "U"
for Update, and "D" for Delete to
indicate the permissions or restrictions
for each operation.
ENTITY RELATIONSHIP
DIAGRAMS (ERD)
Used for both analysis and design
Represents:
 the people, places and things that the system keeps information about
 the structure of the data
 the relationships between different pieces of data

Does NOT show process, roles, users, etc.


ERD-BASIC ELEMENTS:
ENTITIES
Definition
 people, places, events, things
 a set of things all of which have the same data properties - must be a
collection of more than one thing
 entity instance is one concrete example of the entity type
 things that the system keeps track of, NOT things that are part of the
system

Symbol: rectangle
Example:
Customer Order

Student Course
BASIC ELEMENTS:
RELATIONSHIPS
Definition
 show how instances of one entity are related to instances of
another entity
 not the same as process relationships
 have cardinality
 Represented by line plus text description

Customer Order
Book/Is booked by

Student Course
Enroll/is enrolled by
BASIC ELEMENTS:
ATTRIBUTES
Definition
 single pieces of data that describe an instance of an entity
 like data elements

Customer Order
Book/Is booked by
customer ID order ID
first name merchandise name
last name amount
phone number order date
CARDINALITY CONSTRAINTS
 Cardinality: the number of associations that occur
among data entities
 Symbols: crow’s feet, circle, straight line
BASIC EXAMPLE ERD
ERD WITH MANY-TO-
MANY RELATIONSHIP
MANY-TO-MANY RELATIONSHIP CONVERTED TO
ASSOCIATIVE ENTITY TO STORE GRADE
ATTRIBUTE
CUSTOMER SUPPORT SYSTEM ERD
ERD EXERCISE
This diagram illustrated a
business scenario. Draw
the ERD for this scenario.
Specify:
• entities,
• attributes,
• relationships,
• cardinality
ERD EXERCISE - SOLUTION

Book/is booked by Contain/


is contained in
EXAMPLE OF ERD Read more on ERD
EXERCISE 8.2
Draw a complete ERD for the process of the mini project 2
DATA
DICTIONARY
NEED FOR UNDERSTANDING THE
DATA DICTIONARY
Provide documentation
Eliminate redundancy
Validate the data flow diagram
Provide a starting point for developing screens and reports
Determine the contents of data stored in files
To develop the logic for DFD processes
Create XML
WHAT NEEDS TO BE DEFINED
Data flows Entities

Data stores Relationships

are are
collections collections
of of

Data elements correspond to Attributes


Figure 8.1 How Data Dictionaries Relate
to Data Flow Diagrams
DATA DICTIONARY
CATEGORIES
Data flows
Data structures
Elements
Data stores
9.1 DEFINING THE
DATA FLOW
ID — identification number
Unique descriptive name
A general description of the data flow
The source of the data flow
The destination of the data flow
Type of data flow
The name of the data structure describing the elements
The volume per unit time
An area for further comments and notations
AN EXAMPLE OF A DATA FLOW DESCRIPTION FROM
WORLD’S TREND CATALOG DIVISION
9.2 DESCRIBING DATA
STRUCTURES
Data structures are made up of smaller structures and elements
An algebraic notation is used to describe data structures
ALGEBRAIC
NOTATION
Equal sign means “is composed of”
Plus sign means “and”
Braces {} mean repetitive elements
Brackets [] for an either/or situation
Parentheses () for an optional element
Figure 8.4 Data Structure Example for Adding a Customer Order
at World’s Trend Catalog Division
STRUCTURAL RECORDS
A structure may consist of elements or structural records
These are a group of elements, such as:
 Customer name
 Address
 Telephone
Each of these must be further defined until they are broken
down into their component elements
LOGICAL AND PHYSICAL
DATA STRUCTURES

Logical: Physical:
Show what data the business needs for its day-to- Include additional elements necessary for
day operations implementing the system (usually as primary or
foreign key)
For ex: CustomerID, ProductID
PHYSICAL DATA STRUCTURES
Key fields used to locate records
Codes to identify record status
Transaction codes to identify different record types
Repeating group entries
Limits on items in a repeating group
Password
7.3 DATA
ELEMENT
Element I D
The name of the element
Aliases
A short description of the
element
Element is base or derived
Element length
Type of data
TYPE OF DATA
Alphanumeric or text data
Formats
 Mainframe: packed, binary, display
 Microcomputer (PC) formats
 PC formats, such as Currency, Number,
or Scientific, depend on how the data will
be used
SOME EXAMPLES OF DATA
FORMATS USED IN P C SYSTEMS
Data Type Meaning

Bit A value of 1 or 0, a true/false value

Char, varchar, text Any alphanumeric character

Datetime, smalldatetime Alphanumeric data, several formats

Decimal, numeric Numeric data that are accurate to the least significant digit;
can contain a whole and decimal portion
Float, real Floating-point values that contain an approximate decimal
value
Int, smallint, tinyint Only integer (whole digit) data

Currency, money, smallmoney Monetary numbers accurate to four decimal places

Binary, varbinary, image Binary strings (sound, pictures, video)

Cursor, timestamp, uniqueidentifier A value that is always unique within a database

Autonumber A number that is always incremented by one when a record


is added to a database table
FORMAT CHARACTER CODES
Formatting Character Meaning
X May enter or display/print any character
9 Enter or display only numbers
Z Display leading zeros as spaces
, Insert commas into a numeric display
. Insert a period into a numeric display
/ Insert slashes into a numeric display
- Insert a hyphen into a numeric display
V Indicate a decimal position (when the decimal point is not
included)
VALIDATION CRITERIA
Ensure that accurate data are captured by the system
Elements are either:
 Discrete, meaning they have fixed values
 Continuous, with a smooth range of values
DEFAULT VALUE
Include any default value the element may have
The default value is displayed on entry screens
Reduces the amount of keying
 Default values on GUI screens
 Initially display in drop-down lists
 Are selected when a group of radio buttons are used
7.4 DATA STORES
Data stores are created for each different data entity
being stored
When data flow base elements are grouped together
to form a structural record, a data store is created for
each unique structural record
Because a given data flow may only show part of the
collective data that a structural record contains, many
different data flow structures may need to be
examined to arrive at a complete data store
description
DESCRIBING THE DATA STORE
The data store ID
The data store name
An alias for the table
A short description of the data store
The file type
File format
The maximum and average number of records on the file as well as the
growth per year
The file or data set name specifies the file name, if known
The data structure should use a name found in the data dictionary
Primary and secondary keys
Comments
CREATING THE DATA
DICTIONARY
Data dictionary entries
 Created after the data flow diagram is completed
Or
 Created as the data flow diagram is being developed
 Created using a top-down approach
TWO DATA FLOW DIAGRAMS AND CORRESPONDING DATA
DICTIONARY ENTRIES FOR PRODUCING AN EMPLOYEE
PAYCHECK
EXERCISE 8.3
 Develop a Database (multiple sheet) for mini project 2 (excel hoặc
googlesheet)

You might also like