You are on page 1of 23

1

Database Systems
Lecture 3

Dr. Abid Sohail Bhutta


abidbhutta@cuilahore.edu.pk
Department of Computer Science,
COMSATS University , Lahore Campus
Lecture 3
Data Flow Diagrams, Advantages of
the Database Approach

3
Organizing Data
 Entity - distinct object (i.e., person, place,
thing, concept or event)
 Attribute - describes some aspect of the
entity (object)
 Property of the entity
 Relationship - association between entities
Entity Entity

Customers Purchases
Account_number Invoice_number
Attributes Name Account_number
Address Purchase_date
Relationship
Stereos to Go Database

Managemen
t Queries
Customer
Orders
Application
Order Items DBMS
Programs
Products
Manufacturers • DDL
• DML
Other
• Controlled access
Central Repository Software
(Organizational resource)
Single Access Point Multitude of
Applications
Components of a Database
Environment
 Hardware
 Software: DBMS, application program and query
software
 Data: Organized in a schema, partitioned into
subschemas
 Procedures: Govern the design, access and use
of the database
 People: Administrators (DA, DBA), designers
(logical and physical), application developers
and users (novice and high-powered)
Advantages of the Database Approach

 Control of data redundancy


 Data consistency
 Greater informational gain, more information
from the same amount of data
 Sharing data, organizational resource (i.e.,
shared resource)
 Improved data integrity, validity and consistency
 Improved access and security
 Enforcement of standards
Advantages of the Database Approach

 Economy of scale, centralization and consolidation


 Balancing of conflicting requirements, DBA oversees
data and data definitions
 Improved data accessibility and responsiveness
 Increased productivity
 Improved maintenance through data independence
 Increased concurrency
 Improved backup and recovery services
Disadvantages of the Database
Approach
 Complexity
Dedication of resources including technology
 Size and people infrastructures

 Cost of DBMS
 Additional hardware costs
 Cost of conversion
 Performance
 Higher impact of failure
 In a production environment, processing can be
slow
Creating Data Flow Diagrams
Steps:

1. Create a list of activities


2. Construct Context Level DFD
(identifies external entities and processes)
3. Construct Level 0 DFD
(identifies manageable sub process )
4. Construct Level 1- n DFD
(identifies actual data flows and data stores )
5. Check against rules of DFD
DFD Naming Guidelines

 External Entity  Noun


 Data Flow  Names of data
 Process  verb phrase
 a system name
 a subsystem name
 Data Store  Noun
Creating Data Flow Diagrams
Lemonade Stand Example
Creating Data Flow Diagrams
Example Steps:
The operations of a simple 1. Create a list of activities
lemonade stand will be used
• Old way: no Use-Case Diagram
to demonstrate the creation
of dataflow diagrams. • New way: use Use-Case Diagram
2. Construct Context Level DFD
(identifies sources and sink)
3. Construct Level 0 DFD
(identifies manageable sub processes )
4. Construct Level 1- n DFD
(identifies actual data flows and data stores )
Creating Data Flow Diagrams
Example 1. Create a list of activities

Think through the activities


that take place at a lemonade
stand.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product
Creating Data Flow Diagrams
Example 1. Create a list of activities

Also think of the additional


activities needed to support
the basic activities.
Customer Order
Serve Product
Collect Payment
Produce Product
Store Product
Order Raw Materials
Pay for Raw Materials
Pay for Labor
Creating Data Flow Diagrams
Example 1. Create a list of activities

Group these activities in


some logical fashion,
possibly functional areas.
Customer Order
Serve Product
Collect Payment

Produce Product
Store Product

Order Raw Materials


Pay for Raw Materials

Pay for Labor


Creating Data Flow Diagrams
Example 2. Construct Context Level DFD
(identifies sources and sink)
Create a context level
diagram identifying the
Context Level DFD
sources and sinks (users).
Sales Forecast
Order 0.0
CUSTOMER Lemonade Production Schedule EMPLOYEE
Customer Order Product Served System Pay
Serve Product Payment Time Worked
Collect Payment Received Goods
Payment
Purchase Order
Produce Product
Store Product VENDOR

Order Raw Materials


Pay for Raw Materials

Pay for Labor


Creating Data Flow Diagrams
Example 3. Construct Level 0 DFD
Create a level 0 diagram (identifies manageable sub processes )
identifying the logical Level 0 DFD
subsystems that may exist.
1.0
Sale
Customer Order Sales Forecast
Customer Order
Product Ordered
Serve Product
Payment
Collect Payment 2.0 Production
CUSTOMER EMPLOYEE
Production Schedule
Product Served
Produce Product
Received Goods Inventory
Store Product
3.0
VENDOR Procure- Order
Purchase Order
Order Raw Materials ment Decisions
Pay for Raw Materials Payment
Pay Time Worked

Pay for Labor 4.0


Payroll
Creating Data Flow Diagrams
Example 4. Construct Level 1- n DFD
Create a level 1 (identifies actual data flows and data stores )
decomposing the processes Level 1 DFD
in level 0 and identifying
CUSTOMER
data stores.
Customer Order
ORDER
Request for Forecast
Customer Order
1.1
Serve Product Record
Collect Payment Order 1.3
Produce
Severed Order Sales
Produce Product Payment Forecast
Sales Forecast
Store Product
1.2
Receive PAYMENT
Payment
Order Raw Materials
Pay for Raw Materials

Pay for Labor


Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying
Product Order
data stores.
ORDER
Customer Order 2.1
Serve Quantity Severed
Serve Product Product
Collect Payment RAW
Production
MATERIALS
Schedule
Produce Product 2.2
Store Product Produce Quantity Used
Product

INVENTORTY
Order Raw Materials Production Data
Pay for Raw Materials
2.3 Quantity Produced &
Store Location Stored
Pay for Labor Product
Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying Order Decision
PURCHASE
data stores. 3.1 ORDER
Produce
Purchase
Customer Order Order Quantity On-Hand
Serve Product RAW
Quantity MATERIALS
Collect Payment Received Received
Goods
3.2
Produce Product Receive
Items
Store Product RECEIVED
ITEMS
Payment Approval
Order Raw Materials
VENDOR
Pay for Raw Materials 3.3
Pay
Vendor
Pay for Labor
Payment
Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying Time Worked

data stores. 4.1 TIME CARDS


Record
Time
Customer Order Worked Employee ID
Serve Product EMPLOYEE
Collect Payment
Payroll Request
4.2
Unpaid time cards
Produce Product Calculate
Payroll
Store Product PAYROLL

Payment Approval
Order Raw Materials
4.3
Pay for Raw Materials Pay
Employe
e PAYMENTS
Pay for Labor
Payment
Process Decomposition
1.1 1.2
1.0
Record Receive
Sale
Order Payment

2.1 2.2 2.3


2.0
Serve Produce Store
Production
Product Product Product

0.0
Lemonade
System 3.1
3.0 3.2 3.3
Produce
Procure- Receive Pay
Purchase
ment Items Vendor
Order

4.1 4.3
4.2
4.0 Record Pay
Calculate
Payroll Time Employe
Payroll
Worked e

Context Level Level 0 Level 1

You might also like