Nothing Special   »   [go: up one dir, main page]

Data Flow Diagrams

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

Data Flow Diagrams

DFD

Meaning/Type
Introduced by De Marco (1978) and Gane and Sarson (1979) DF is a graphic representation of a system. Physical and logical

Levels
E TLP E 1 2 3

3.1 1.1 1.2 1.3

3.2

1.1.1

1.1.2

1.1.3

Symbols
Flow
Entity

Process

Data Store

Prepare Physical and Logical DFD


Issue out a book from library
Library User 1.0 Issue Clerk Selected Book + Lib Card 1.0 Book Issue Process

Book issued after Stamping and recording The return date

Lib Card Store

Prepare Physical and Logical DFD


Return to Library
Library User 2.0 Receiving Clerk 2.0 Book Receiving Process

Book

Return the Lib card

Lib Card Store

Prepare Physical and Logical DFD


Return to Library
Library User 2.0 Book Receiving Process

Book

Fine slip

2.1 Check for Over due Process Fine File

Return the Lib card Fine Money Lib Card Store

Home Assignment
Getting ticket reserved for a train journey Getting item issued form a store Getting your mark sheet from a University Office

Home Assignment
A magazine is published monthly and is sent by post to its subscribers. Two months before the expiry of subscription, a reminder is sent too the subscribers. If subscription is not received within a month time another reminder is sent. If renewal subscription is not received up to two weeks before of the expiry of the subscription the subscribers name is removed from the mailing list and the subscriber is informed. Draw a logical DFD.

Answer

Second Example
A customer presents a cheque to a clerk. The clerk checks a file containing all account numbers and makes sure whether the account number in the cheque is valid., whether adequate balance is there in the account to pay the cheque, and whether signature is authentic. Having done these the clerk gives the customer a token. The clerk also debits customers account by the amount specified on the cheque. If cash cannot be paid due to error in the cheque, the cheque is returned. The token number is written on the top of the cheque and it is passed on to the cashier. The caisher calls out the token number and the customer goes to the cash counter with the token. The cashier checks the token number, takes the customers signature ,pays cash, enters cash paid in a ledger called day book and files the cheque.

Physical DFD of encashing cheque

For Logical Identify Major Process


Retrieve customer record Check balance update and issue token Store token number and cheques Search and match token Update daily cash book

Logical DFD

Entity Relation and Attributes


Entity which specify distinct real world items in an application. Relationships which connect entities and represent meaningful dependencies between them Attributes which specify properties of entities and relationships

ER Representation
Vendors Orders

Supplies

Placed With

Items

Vendors

ER Representation
Orders

Placed For

Orders Paced with Vendors Vendors Supplies Items Orders Place for Items

Placed With

Vendors Items Supplies

ER Representation
Vendors Orders

Supplies

Placed With

Items

Vendors

Attributes
Vendors
Vendor Code Vendor Name Address

Supplies

Vendor Code Item Code Order No Quantity Supplied Date of Supply Price/Unit Item Code Item Name

Items

Relations
Teacher
Vendor

Advices

Supplies

N Students

M Items

Breaking the Entities


First normal form: A table is in the first normal form if it contains no repeating columns. Second normal form: A table is in the second normal form if it is in the first normal form and contains only columns that are dependent on the whole (primary) key. Third normal form: A table is in the third normal form if it is in the second normal form and contains only columns that are non dependent on the primary key.

Order Table
Order no. Order Date Item Lines Item code 1456 1886 09/09/2011 04/03/2012 3687 Qty Price /unit 52 50.40

4627
4623 2345 4589 1788 19/05/2000 9876

38
44 33 55 44

60.20
20.25 19.89 44.33 12.89

Order Table IN First Normal Form


Order no. Order Date Item Lines Item code 1456 1456 09/09/2011 09/09/2011 3687 4627

Qty Price /unit


52 38 50.40 60.20

1886 1886
1886 1788

04/03/2012 04/03/2012
04/03/2012 19/05/2000

4623 2345
4589 9876

44 33
55 44

20.25 19.89
44.33 12.89

Order Table IN First Normal Form


Order no. Order Date Item Lines Item code 1456 1456 09/09/2011 09/09/2011 3687 4627

Qty Price /unit


52 38 50.40 60.20

1886 1886
1886 1788

04/03/2012 04/03/2012
04/03/2012 19/05/2000

4623 2345
4589 9876

44 33
55 44

20.25 19.89
44.33 12.89

Order Table IN Second Normal Form


Second normal form: A table is in the second normal form if it is in the first normal form and contains only columns that are dependent on the whole (primary) key. (a) Orders = Order no. + Order Date (b) Order Details = Order no. + Item Code + Qty (c) Prices = Item Code + Price /Unit

Order Table IN Third Normal Form


Third normal form: A table is in the third normal form if it is in the second normal form and contains only columns that are non dependent on the primary key. (a) Orders = Order no. + Order Date (b) Order Details = Order no. + Item Code + Qty + Price/Unit

(a) Item Master = Item Code + Price/Unit

Practice

Raw Employee Table

Employ Employ Job Job ee ee code Title Number Name

Project Completi Hours Numbe on Work r Date ed

Raw Employee Table


Employ Employ Job Job ee ee code Title Number Name 120 Ramu 1 Pgm 120 121 121 270 270 Ramu Damu Damu Daku Daku 1 1 1 2 2 Pgm Pgm Pgm Analys t Analys t Project Completi Hours on Numbe Work r Date ed 01 7/17 37 08 01 12 08 12 1/12 7/17 3/21 1/12 3/21 12 45 107 10 41

Raw Employee Table


Employ Employ Job Job ee ee code Title Number Name 279 Shiftu 1 Pgm 279 279 Shiftu Shiftu 1 1 Pgm Pgm Project Completi Hours on Numbe Work r Date ed 01 1/12 27 08 12 3/21 7/17 20 51

Primary Key : Employee Number , Project Number

First Normal Form


Relational tables are automatically in first normal form. A table in first normal form may contain highly redundant data resulting in the following serious problems. Insert : A new project can not be entered until there are employees working on it. Delete : Suppose a employee working only on one project stops working . Then deleting the record of the employee will also delete other information if the project also Updating : Suppose an employee changes his job form Programmer to Designer . This updating

Second Normal Form


Identify the primary key and determine which columns are functionally dependent on it. Employe Employe Job e e Code Number Name Projec Completi t on Numb Date er Job Title

Employee Project Number Number

Hours Worked

Third Normal Form


Remove Transitive Dependency ie ?A- B C If C is functionally depends in B and B depends on A then C depends in A Job Job Job Emp Employe Employe Job Code Title e e Code Number Name

Project

Projec Completi t on Numb Date er

Employee Project Number Number


Hr Worked

Hours Worked

You might also like