Presentation on theme: "CAPE COMPUTER SCIENCE UNIT 2"— Presentation transcript:
1CAPE COMPUTER SCIENCE UNIT 2 DATA FLOW DIAGRAMSCAPE COMPUTER SCIENCE UNIT 2T.Batchelor in collaboration with Y.C.LeMard
2IntroductionData inputprocessInformation outputWe’ve learnt that a computer takes in data, processes it, and produces information as output
3We also know that the processing is really done by a program. IntroductionWe also know that the processing is really done by a program.Therefore a program (or a set of programs) receives data, does something to it, and produces information for the userprocess= program
4And hopefully this is what your I.A. program will do too. IntroductionIf you think about it carefully you will acknowledge that this is what all the programs you have written up to this point do.And hopefully this is what your I.A. program will do too.
6It is an essential systems analysis and design tool Data Flow DiagramsA Data flow Diagram (DFD) is a pictorial representation of this flow of data through a computer system.It is an essential systems analysis and design tool
9Luckily our DFDs will not need to be so complex. But from these examples we can isolate the components of a DFD
10Data Flow Diagrams have 4 symbols DFDsData Flow Diagrams have 4 symbolsSharp cornered, shadowed rectanglesRounded cornered rectanglesOpened sided rectanglesArrows
111. External EntitiesThe sharp cornered rectangles (or simply boxes) in a DFD indicate entities.Entities are people, things, organizations, etc outside of the system.Entities are the source of data and the destination of data.External Entity
13As you will have guessed, all external entities must be labeled. It must be obvious too that every system must have at least one entityMs LeMard
142. ProcessesThe rounded cornered rectangles in a DFD indicate processes.Processes are the changes that data go through causing it to be transformed gradually into information.ProcessEvery computer program is a process
15Patient Administration system ProcessesShipping systemAccounting systemReservation systemGrading systemMarketing systemPatient Administration system
16Just like entities all processes must have a name. Medical Expert SystemAlso every computer system has at least one process
17This is a generally accepted sign for a data store (file) File NameThis is a generally accepted sign for a data store (file)
18Data Store Employees’ Data Students’ Grades Order Details Accounts Receivable File
19A ‘data store’ is a secondary storage device which holds a file. Most meaningful systems store permanent data in one or more master files. Transactions files are also used in batch processing systems
20Not every system has a file however, some are totally interactive. Data StoreNot every system has a file however, some are totally interactive.In addition very simple DFDs [ Context Level DFDs ] do not include any data stores
214. DataDataThe arrows in a DFD show the data. Data must come from somewhere and go to somewhere else. The direction of the arrow indicates this.All arrows must be labelled to show what particular piece of data is being referred to.
25The Top-Down approach is taken to the design of DFDs. Types of DFDThe Top-Down approach is taken to the design of DFDs.Data flow diagrams are therefore classified by levels. Each subsequent level indicates greater details.
26LevelsLevel 0 DFDThe Level 0 DFD (also known as the Context Level DFD) is the simplest DFD. This diagram shows a single process and all external entities which interact with this process, and the data flowing to and from the process.
27Context Level DFD for a Mail Order Business Order ProcessingCustomerDelivery
28DecompositionLevel 1 DFDsA Context Level DFD is broken down (exploded) into a set of processes, the data moving between these processes, the entities interacting with these processes and the data stores.
29Level 1 DFD for a Mail Order Business Sales processingCustomerOrderDeliveryOrderCredit StatusOrderCustomer DatabaseOrdersCredit StatusAccounting SystemCustomer number
30Decomposition Level 2 and other Level DFDs Each process from Level 1 is exploded even more into sub processes. This decomposition continues for each subsequent level. The number of levels possible depends on the complexity of the system.
31The Value of a DFDWith a dataflow diagram, users are able to visualize how the system will operate, what the system will accomplish, and how the system will be implemented.Dataflow diagrams can be used to provide the end user with a physical idea of how the data they input ultimately has an effect upon the structure of the whole system.
32The Value of a DFDThe old system's dataflow diagrams can also be drawn up and compared with the new system's dataflow diagrams to draw comparisons in order to help implement a more efficient system.
33Context Level DFD for a Payroll System SupervisorHours workedPayroll SystemPersonal DataEmployeePay cheque
34Level 1 DFD for a Payroll System Batching systemPersonnelsystemSupervisorHoursworkedEmployee personal dataHours workedPersonal DataEmployee DatabaseAccounting dataEmployee recordEmployeeAccounting detailsAccounting detailsSalaryGenerationSystemPay cheques
35How to Create A Level 0 Data Flow Diagram Identify your main system’s focusIdentify the external people/ organisations who interact with the systemDecide what data these entities will enter into the systemDetermine what these entities expect as output from the system
36How to Create A Level 1 Data Flow Diagram Focus on your process and break it into 2 or more sub-processesIdentify what data flows between these processes and between the entitiesIdentify what permanent data files are used in this system.Note that no new entities can be introduced
37BEWARE Data can not flow directly from file to file. Data can not flow directly from entity to entityNo process can have no input data yet have output data, that would be a miracle.No process can have input data yet have no output data, that would be a black hole.
39Questions What is the purpose of a data flow diagram? What 4 symbols are used in a DFD?Which symbols must appear on every DFD?Every process must have data going in and data coming out. Why?
40Exercise1. Draw a Level 0 Data Flow Diagram for the following situation:A travel agency takes calls from clients, checks seat availability on the flights they desire and makes a reservation for them if all is clear.2. Explode your Context Level diagram into a Level 1 DFD