Module8 New
Module8 New
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
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
10
EXAMPLE: MODELLING PROCESS
HIERARCHIES
Process Receive and
Level 3 Inquiry and Validate ...
Quote Order
Clear Order
Credit
Level 5 Check Credit
Record
available
...
Contact
customer
Credit not
available
account rep.
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
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
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
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
are are
collections collections
of of
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
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