250 likes | 574 Views
Context Diagrams and Data Flow Diagrams: Important Tools in the Analysis Stage of the PSM. Context Diagrams and Data Flow Diagrams.
E N D
Context Diagrams and Data Flow Diagrams: Important Tools in the Analysis Stage of the PSM
Context Diagrams and Data Flow Diagrams These are tools used in the Analysis phase of the Problem Solving Methodology to describe the movement of data and information to and from the system (Context Diagrams), and also within the system (Data Flow Diagrams), and its entities and data stores.
Context Diagrams • The first we will discuss is the Context Diagram (CD), also sometimes called a level 0 Data Flow Diagram.
Context Diagrams and Data Flow Diagrams Some terms and symbols you must know: • In a Context Diagram the system is represented by a large and appropriately labeled circle. There is only ever one such circle in a Context Diagram. Name goes here!
Context Diagrams and Data Flow Diagrams • Entities are the people, organizations or outside programs that the system takes data or information from or gives it to. • Entities are represented by rectangles with the name of the entity written inside the rectangle. • There must be at least one entity or data store in every Context Diagram or Data Flow Diagram. Entity
Context Diagrams • Flows of data/information between the System and entities in a Context Diagram are shown by labeled arrows for type and direction of data/information. • There must be at least one data flow. • There is never a data flow from one entity directly to another because this is of no concern to the system. named data flow System Entity
An example of a simple Context Diagram Booking Invoice Diners Food Suppliers Nishan’s Restaurant System Bill Order Food Order
Context Diagrams • The following is not possible in a CD as there can NEVER be a data flow between entities: Confirm Delivery Widget System Payment Customer Drivers Tips
Context Diagram • The following is also impossible. Do you see why? The Impossible System The Impossible Entity
Context Diagrams • Likewise this makes no sense: The Impossible System
Context Diagrams • All data flows must be labeled with the name of the data; • Data flows always show the movement of data, not things. Do you see why?
Context Diagram • Now, draw the Context Diagram for the Rina Tennis Club System based on the following scenario.
Context Diagram for the Rina Tennis Club System • Current Members give their availability details for forthcoming competitions. • New Members give their personal details to the club. They receive a new members information kit by email when they join. • All members receive a regular newsletter email (this includes the competition details, including who is playing, plus news items). • The Club Committee gives the competition details to the system for inclusion in the newsletter as well as the news items, and receives member availability details. (Hint: the entities have been bolded.)
Rina Tennis Club: CD Solution Newsletter Items Availability Details Current Member Availability Committee Rina Tennis Club Newsletter Competition Details Newsletter Personal Details New Member Information Kit
Context Diagrams • Lets try some past exam questions … (these are in your handouts).
Context Diagrams • Context Diagrams are surprisingly powerful tools because they tell you what information your system takes in and what information it gives out. • But what is one obvious thing that they do not tell you?
Data Flow Diagrams • A Data Flow Diagram shows the system’s interaction with entities just as a Context Diagram does. • However, a Data Flow Diagram also shows the flows of data and information between the system’s internal processes as well (these are not shown at all in a Context Diagram).
Data Flow Diagrams • A Data Flow Diagram expands the Context Diagram for the same system but both will show the same external entities and data flows. Do you see why?
Data Flow Diagrams • These processes are represented by a series of small, labeled circles. The Data Flow Diagram shows the interaction of these processes with the entities. Aside from the presence of these processes (and the data flows between them), which replace the single System circle of the Context Diagram, the Data Flow Diagram is just the same as a Context Diagram.
Context Diagrams and Data Flow Diagrams One last thing: in addition to entities your Context Diagram or Data Flow Diagram may also show data stores. As the name suggests these are sites where the system stores or sends data (such as a data base). They are represented by two parallel horizontal lines or by a box open on the right hand side.
CD and DFD symbols • Here are the symbols you will meet in CDs and DFDs: The system Data flow A data store process Another way of showing a data store entity
Context Diagrams and Data Flow Diagrams Context Diagrams and Data Flow Diagrams are powerful tools because • they clearly illustrate the flows of data and information in and out of your system, and all of the entities involved, and this is very important to you as the programmer of the system. • they can describe either the old or the proposed new system.