B B.1 Barnaby Electronics Ltd - Creating the Data Flow Diagram Quotations and Orders Department - Current System Description The following text describes the day-to-day actions that take place in the case study company called Barnaby Electronics Limited, in the Quotations and Orders department. Quotations and Orders Department A customer may contact the department over the telephone or by fax or post. If the customer is requesting a quote for an order, the Sales Administrator will complete a Contact Sheet. The contact sheet contains the name and address of the customer, along with the products the customer wishes to be quoted for. Sometimes the customer knows the product number of the products, especially if the customer has placed a regular orders previously, but often, a description of the product required is all that is provided. The contact sheet is then passed to the Purchasing department for them to fill in the purchase price, expected delivery date and any missing product numbers. The member of staff who completed the form must date the Contact form before returning it to the Sales Administrator. Once the completed Contact Sheet is returned to the Sales Administrator, a quote is written, detailing the product number, description, quantity, price and Expected Delivery Date for each product, total price and any special requirements. The sales price on the quote is always 30% higher than the purchase price provided on the contact sheet. The original quote is then sent to the customer and a copy is placed on file. It is usually expected that a customer request will be quoted within five working days . Appendix B Barnaby Electronics Ltd 7 A customer must send an order in by post or fax, to provide a signature. An order may be as detailed as it's quote or very brief indeed. Every order must have been preceded by a quote, since product availability, prices and delivery times vary from week to week. The original quote corresponding to the customer's order must be found by searching through the quote file. If the corresponding quote cannot be found, the order is returned to the customer. Once the corresponding quote has been found, an order acknowledgement is sent to the customer and the date on which the order was received is written on the quote. The original Customer's order is then attached to the quote and filed away. A photocopy of the order and the quote is passed on to the Purchasing department who will process the order. Although in most cases an order will list all the items listed on a quote, it is possible that the products listed on a quote will be ordered in two or more separate orders. In this case, the first order will be treated as any other order. When the second and subsequent orders are received an order acknowledgement is sent to the customer and the order is attached to the quote and previous orders, and filed. A copy of the quote and most recent order are then sent to the purchasing department and the quote is appended to show the date most recent order was received. Once all products on an order have been delivered to the customer, the photocopy of the order and quote is passed back to the Sales Administrator from the Purchasing department. The order copy will have the actual date of delivery stamped on it. The Sales Administrator will write the Expected Delivery Date on the original order and throw away the copy. 8 Mastering Database Design Appendix B B.2 Steps required to create a Data Flow Diagram The following steps must be carried out to convert the text provided into a Data Flow Diagram: 1. Draw a rough picture of your current system - showing the sequence of events. 2. Identify the boundary of your system on your system picture 3. The boundary on your system picture will help to identify the External Entities 4. Identify the Data Stores 5. Split the text into individual tasks 6. Build a Task table for each task, and split the task into smaller instructions if possible. 7. Identify the Inputs to each instruction, and the source of those inputs. 8. Identify the Outputs from each instruction, and the destination of the output. 9. Drawing Process Boxes and Data Flows on the Data Flow Diagram from your Task tables. B.3 Draw a Rough Picture of the Current System In order to draw a picture of the current system, I have identified various items: Customer, Sales Administrator, Contact Sheet, Purchasing, Quote, Order and Order Acknowledgement. The drawing will show the sequence of events that occur involving these items. Appendix B Barnaby Electronics Ltd 9 Purchasing 4. Please send me a quote for 10 speakers type 157, black, 12" 1. Customer Contact Sheet Purchase Price, Expected Delivery Date, Product No. Authorisation Date Completed Order and Quote Copies Actual Delivery Date 5. 16. 3. 17. Contact Sheet Customer name, Address, Product No and /or description Quantity 7. Sales Administrator 2. 6. Quote Product No. and Description, Quantity, Sales price, Delivery Date Order and Quote File Copy 8. 10a. 14. 9. Order Product No. Quantity, Signature Delivery Date 10b. Unmatched Order (go back to step 2) 12. Order Acknowledgement 10 Mastering Database Design 14. 17. 13. Matching Quote Found Date Order Received 13. Copy Copy 15. 11. Appendix B B.4 Identify the Boundary of the System on the System Picture To do this, the Terms of Reference must be referred to, in particular the Scope of the New System section. This section is as follows: The new system will only comprise those functions currently carried out by the Quotations and Orders department. The customer will continue to receive a quote on paper from the department, as well as an order acknowledgement on paper, when an order is sent by the customer. The customer's order will be retained within the system. The Purchasing department will continue to receive a contact sheet listing initial requirement details and will return the completed contact sheet. The Purchasing department will also receive details of the order and the matching quote for each new order as will return the completed order details as before. It appears from this description that the only functions to be carried out by the new system are those currently carried out by the Sales Administrator in the system picture above. The Customer will not be part of out system, but will still receive Quotations and Order Acknowledgements from our system, and will send in Orders. the Purchasing department will also not be part f the system. They will still receive Contact Forms and complete them before returning them. They will also receive the copies of the Orders and Quotes to carry out the Orders, and send the completed Order forms back as before. The system boundary will be shown on the Systems Picture as follows: Appendix B Barnaby Electronics Ltd 11 Purchasing 4. Please send me a quote for 10 speakers type 157, black, 12" 1. Customer Contact Sheet Purchase Price, Expected Delivery Date, Product No. Authorisation Date Completed Order and Quote Copies Actual Delivery Date 5. 16. 3. 17. Contact Sheet Customer name, Address, Product No and /or description Quantity 7. Sales Administrator Quote Product No. and Description, Quantity, Sales price, Delivery Date 6. Order and Quote File Copy 8. 10a. 14. 9. Order Product No. Quantity, Signature Delivery Date 10b. Unmatched Order (go back to step 2) 12. 2. Order Acknowledgement 14. 17. 13. Matching Quote Found Date Order Received 13. Copy Copy 15. 11. System Boundary 12 Mastering Database Design Appendix B B.5 Identify the External Entities using the System Boundary The System Picture above showing the System Boundary makes it easy to identify the two External Entities relating to the System. An external entity can be defined as a person, group of people or an automated object that sends information to your system, or receives information from your system. A group of people can be represented by a Company or a department for example and an automated object could be a computer. In this case study, the two external entities are the Customer and the Purchasing Department. These external entities should be placed around the outside of your initial Data Flow Diagram as follows: Customer B.6 Purchasing Identify Data Stores from the System Picture It is possible to identify the data stores from the text as well as from the system picture - although it easier to identify them from the system picture. In this case study, there appear to be three: Contact Sheet, Quote and Order. The Quote and Order file is not actually a data store in it's own right, it is merely a container for the Quotes and Orders. When a Quote or an Order is placed in the File, the information is still on that Quote or Order, it has not been transferred. Order Acknowledgement is really a Data Store, since it does not Appendix B Barnaby Electronics Ltd 13 contain any information in its own right, it is merely a copy of some information from the Order sent back to the customer to let the Customer know that the Order has been received. The three data stores will be added (in pencil at first, since their position may need to change once you add the processes) to the data Flow Diagram as follows: Customer Purchasing Contact Sheet Quote Order B.7 Splitting the Text into Individual Tasks When splitting the text up into individual tasks, it is worth considering the following: • Try to differentiate between text relating to information, such as the details that are stored on the contact sheet, and the text relating to the actions taking place, such as the contact sheet is passed to the purchasing department. Split the text up by the actions. • Don't worry too much about the split. If you have inadvertently split up an action that should have been kept as one, this will become apparent when you fill in the Task table, and you will merge the two tasks back into one again. The text can be split into the following eight tasks: 1. A customer may contact the department over the telephone or by fax or post. If the customer is requesting a quote for an order, the Sales 14 Mastering Database Design Appendix B Administrator will complete a Contact Sheet. The contact sheet contains the name, address of the customer, along with the products the customer wishes to be quoted for. Sometimes the customer knows the product number of the products, especially if the customer has placed a regular orders previously, but often, a description of the product required is all that is provided. 2. The contact sheet is then passed to the Purchasing department for them to fill in the purchase price, expected delivery date and any missing product numbers. The member of staff who completed the form must date the Contact form before returning it to the Sales Administrator. 3. Once the completed Contact Sheet is returned to the Sales Administrator, a quote is written, detailing the product number, description, quantity, price and Expected Delivery Date for each product, total price and any special requirements. The sales price on the quote is always 30% higher than the purchase price provided on the contact sheet. 4. The original quote is then sent to the customer and a copy is placed on file. It is usually expected that a customer request will be quoted within five working days. 5. A customer must send an order in by post or fax, to provide a signature. An order may be as detailed as it's quote or very brief indeed. Every order must have been preceded by a quote, since product availability, prices and delivery times vary from week to week. The original quote corresponding to the customer's order must be found by searching through the quote file. If the corresponding quote cannot be found, the order is returned to the customer. 6. Once the corresponding quote has been found, an order acknowledgement is sent to the customer and the date on which the order was received is written on the quote. The original Customer's order is then attached to the quote and filed away. A photocopy of the order and the quote is passed on to the Purchasing department who will process the order. 7. Although in most cases an order will list all the items listed on a quote, it is possible that the products listed on a quote will be ordered Appendix B Barnaby Electronics Ltd 15 in two or more separate orders. In this case, the first order will be treated as any other order. When the second and subsequent orders are received, an order acknowledgement is sent to the customer, and the order is attached to the quote and previous orders, and filed. A copy of the quote and most recent order are then sent to the purchasing department and the quote is appended to show the date most recent order was received. 8. Once all products on an order have been delivered to the customer, the photocopy of the order and quote is passed back to the Sales Administrator from the Purchasing department. The order copy will have the actual date of delivery stamped on it. The Sales Administrator will write the delivery date on the original order and throw away the copy. B.8 Build a Table for each Task, Split into smaller Instructions and identify Inputs and Outputs Although it appears that three of the steps required to carry out the data Flow Diagram are being included here, it is important that the Inputs and Outputs are identified at the time of splitting the tasks into smaller instructions (if possible). If you go through the entire text, examining each task for smaller instructions, write them in your tables, and the go back over the text to identify the inputs and outputs, you need to familiarise yourself with each task twice over. If you identify the Inputs and outputs the first time you examine the tasks, you will save a lot of effort. Each of the above ten tasks is examined and split up into smaller instructions where possible. the Inputs and Outputs to each Tasks, or smaller Instructions are then written in a Task Table as follows: Instruction Input 16 Mastering Database Design Task n from Output to Appendix B Task 1 A customer may contact the department over the telephone or by fax or post. If the customer is requesting a quote for an order, the Sales Administrator will complete a Contact Sheet. The contact sheet contains the name, address, of the customer, along with the products the customer wishes to be quoted for. Sometimes the customer knows the product number of the products, especially if the customer has placed a regular orders previously, but often, a description of the product required is all that is provided. This can be split into two instructions: 1. Customer contacts Sales Administrator with a request for a quote 2. Sales Administrator fills in a Contact Sheet The Inputs to the first instruction are the request details from the Customer. There is no output for the first instruction. There are not inputs to the second instruction, but the outputs are the details written onto the Contact Sheet. This is written in the Task tables as follows: Appendix B Barnaby Electronics Ltd 17 Instruction Customer contacts Sales Administrator with Quote Request Sales Administrator fills in Contact Sheet Input Customer Details, Product No., Prod Desc. Quantity Task 1 from Customer Output to Customer Details, Product No., Prod Desc., Quantity Contact Sheet N.B. The Customer Name and Address have been abbreviated to "Customer Details"): Task 2 The contact sheet is then passed to the Purchasing department for them to fill in the purchase price, expected delivery date and any missing product numbers. The member of staff who completed the form must date the Contact form before returning it to the Sales Administrator. There appear to be two instructions here: 1. Pass Contact Sheet to Purchasing Department 2. Purchasing Department return Contact sheet to Sales Administrator We must be very careful when the text provided describes functions that are being carried out outside the boundary of the system. We are not interested in the tasks carried out by the Purchasing Department, we are only interested in the completed Contact Sheet that is returned to the system as an Input. It is important to be aware of this especially when trying to decide whether a document being transferred from one place to another is actually an Input or Output to or from the system. In this case, the Sales Administrator is inside the system boundary, and Purchasing is outside. So any document going from Sales Administrator to Purchasing is an Output, and any document coming in to the Sales Administrator from Purchasing is an Input to the system. 18 Mastering Database Design Appendix B Remember also, that when you write the Input and Output details in the Task tables, you should only be writing down the details contained on the documents, not the physical documents themselves. Therefore, in the first instruction, although the output may, in real life, be the Contact Sheet, handed to the Purchasing Department, the Output written on the Task table must list the contents of the Contact Sheet and the to column will contain the external entity Purchasing. The same can be applied to the Input to the sales Administrator or the contents of the Contact Sheet, being delivered from Purchasing for the second instruction. the only difference here, it that the information listed in the Input column for this instruction does not need to include all the information on the Contact Sheet, since much of it was there before it was sent to Purchasing. The only information that needs to be included in the Task table, is that information that is newly added, such as the product Number (in some cases), the Purchase price, Expected Delivery Date and Authorisation date. The task table for Task 2 will be as follows: Instruction Pass Contact Sheet to Purchasing department Input Purchasing return Contact Sheet to Sales Administrator Product No., Purchase Price Expected Delivery Date, Authorisation Date Task 2 from Output Customer Details, Product No., Prod Desc, Quantity. to Purchasing Purchasing Although this task appears to obey the input/output rules - in that it has at least one input and one output, the input and the output in this case should not be tied into the same task. This is because they are not carried out as one continuous action by the system (Sales Administrator). Although the Sales Administrator sends out the Contact Sheet to Purchasing, there is no way to determine when Purchasing will return the completed Contact Sheet. The best way to incorporate these instructions into the system are to add them to other Appendix B Barnaby Electronics Ltd 19 appropriate tasks. The first instruction "Pass Contact Sheet to Purchasing Department" could be the third instruction in the previous task, Task 1. This would make sense, since the sales Administrator would receive the request from the customer, fill n the Contact Sheet and then send it to Purchasing. Task 1 will therefore become: Instruction Customer contacts Sales Administrator with Quote Request Input Customer Details, Product No., Prod Desc., Quantity Sales Administrator fills in Contact Sheet Pass Contact Sheet to Purchasing department Task 1 from Customer Output to Customer Details Product No., Prod Desc., Quantity Customer Details, Product No., Prod Desc., Quantity Contact Sheet Purchasing The second instruction in Task 2 would be more suitably included as first instruction in Task 3, where the task refers to the once the completed contact sheet is returned to the Sales Administrator. Task 2 therefore, no longer exists. 20 Mastering Database Design Appendix B Task 3 Once the completed Contact Sheet is returned to the Sales Administrator, a quote is written, detailing the product number, description, quantity, price and Expected Delivery Date for each product, total price and any special requirements. The sales price on the quote is always 30% higher than the purchase price provided on the contact sheet. There is just the one instruction here: writing the Quote. This instruction appears to have only an output; the Quotation details being output to the Quote data store. However, to write the Quote, the Sales Administrator requires some information, in other words, some Input is required. This must come from two sources; basic customer and product details from the Contact Sheet, and the newly added information from Purchasing. This second input will be provided from the second instruction from the now-defunct Task 2. This instruction will be added as the first instruction. This task now has two instructions, providing two inputs and one output. The Task 3 table will be constructed as follows: Instruction Purchasing return Contact Sheet to Sales Administrator Write Quote Appendix B Input Product No., Purchase Price Expected Delivery Date, Authorisation Date Customer Details, product No., product Description, Quantity Task 3 from Purchasing Contact Sheet Output to Customer Details, Product No., Prod Desc, Quantity, Sales Price Expected Delivery Date Quote Barnaby Electronics Ltd 21 Task 4 The original quote is then sent to the customer and a copy is placed on file. It is usually expected that a customer request will be quoted within five working days. This task appears to have two instructions only: 1. 2. Send Quote to customer Place copy of Quote in Quote file The first instruction has an output of the Quote details being sent to the Customer. The second instruction however, needs some careful examination. In out data Flow Diagram, the Quote is already considered to be a Data Store. In Task 3, the second instruction output information to the Quote Data Store. In this instruction however, no more information is being transferred, all is happening is that the Quote Data Store is being placed into a container, the Quote folder or filing cabinet. Since the second instruction is not a valid part of the task, this leaves the task with only the first instruction: Instruction Send Quote to Customer Input Task 4 from Output Customer Details, Product No., Prod Desc, Quantity, Sales Price Expected Delivery Date to Customer Since there is not Input to this task, this instruction will need to be added to another task. the most appropriate task, would be the previous task, Task 3, such that after the quote is written, it is then sent to the Customer. Task 3 will be re-written as follows: 22 Mastering Database Design Appendix B Instruction Purchasing return Contact Sheet to Sales Administrator Write Quote Input Product No., Purchase Price Expected Delivery Date, Authorisation Date Customer Details, product No., product Description, Quantity Task 3 from Purchasing Contact Sheet Send Quote to Customer Output to Customer Details, Product No., Prod Desc, Quantity, Sales Price Expected Delivery Date Customer Details, Product No., Prod Desc, Quantity, Sales Price, Expected Delivery Date Quote Customer Task 5 A customer must send an order in by post or fax, to provide a signature. An order may be as detailed as it's quote or very brief indeed. Every order must have been preceded by a quote, since product availability, prices and delivery times vary from week to week. The original quote corresponding to the customer's order must be found by searching through the quote file. If the corresponding quote cannot be found, the order is returned to the customer. There are three instructions in this task: 1. 2. 3. Receive Order from Customer Find matching Quote Return unmatched Order to Customer Appendix B Barnaby Electronics Ltd 23 The first instruction has Input only, that of the Order details from the Customer. The second instruction has an Input also, the Quote details input from the Quote Data Store that match the Order. The Third instruction has an Output, the Order details being sent to the Customer. Remember again that the task table is concerned with the physical way in which the information is transferred. The task table for Task 5 will be as follows: Instruction Receive Order from Customer Find matching Quote Input Customer Details, Product No., Prod Desc, Quantity, Sales Price, Expected Delivery Date Customer Details, Product No., Prod Desc, Sales Price, Expected Delivery Date Return unmatched Order to Customer 24 Mastering Database Design Task 5 from Customer Output to Customer Details, Product No., Prod Desc, Sales Price, Expected Delivery Date Customer Quote Appendix B Task 6 Once the corresponding quote has been found, an order acknowledgement is sent to the customer and the date on which the order was received is written on the quote. The original Customer's order is then attached to the quote and filed away. A photocopy of the order and the quote is passed on to the Purchasing department who will process the order. Although it sound like there is a lot going on, there are four instructions here: 1. 2. 3. 4. Order Acknowledgement sent to Customer The date the Order was received is written on the Quote File the Order details Order and Quote details sent to Purchasing Many of the actions, such as the reference to the Customer's order being attached to the quote and filed away are references to the physical documents and where they are stored, as opposed to the information on those documents actually being transferred from one document to another. Also, reference to Order and Quote information being sent as photocopies is not relevant here. However, so far we have not explained how the Order details are transferred to the Order data store in our system. Other documents, such as the Contact Sheet and the Quote are written as part of other tasks in the system, but the Order is sent in by the Customer. We must therefore take this opportunity to state that the order details are stored on the Order data store at this point. Each of these four instructions has an output only; Order acknowledgement details sent to Customer, Date order received written to the Quote Data Store, and Quote and Order details sent to Purchasing. These actions are definitely part of the same task, but there must be an input, to provide the information that is being output to these three different sources. But where is the input coming from? Imagine the Sales Administrator doing his work. In the previous task, he found the matching Quote for the Order, and now he needs to use the order and quote information to write the Order Acknowledgement, update the quote and send the information to Purchasing. Since the source of an Input can be either a Data Store, an External Entity or another task, in this instance, the Input information is the matching Order and Quote details transferred from the previous task, Task 5. This receipt of information from the previous task need to be added to the task table as the first instruction, an input. Appendix B Barnaby Electronics Ltd 25 Instruction Receive matching Order and Quote details from Task 5 Input Customer Details, Product No., Prod Desc, Quantity, Sales Price, Expected Delivery Date Send Order Acknowledgement to Customer Write date Order received onto Quote File Order details Send Order and Quote details to Purchasing Task 6 from Task 5 Output to Customer Details, Product No., Prod Desc, Quantity, Sales Price, Expected Delivery Date Date Order Received Customer Customer Details, Product No., Prod Desc, Quantity, Sales Price, Expected Delivery Date Customer Details, Product No., Prod Desc, Quantity, Sales Price, Expected Delivery Date Order Quote Purchasing Task 7 26 Mastering Database Design Appendix B Although in most cases an order will list all the items listed on a quote, it is possible that the products listed on a quote will be ordered in two or more separate orders. In this case, the first order will be treated as any other order. When the second and subsequent orders are received, an order acknowledgement is sent to the customer, and the order is attached to the quote and previous orders, and filed. A copy of the quote and most recent order are then sent to the purchasing department and the quote is appended to show the date most recent order was received. This task appears to contain several new instructions. However, the previous task, Task 6 has already defined how the information is transferred when a matching quote is found for an order. Although this task is explaining what happens when more than one order is place from one quote, if you ignore the physical references to documents and photocopies, the three actions carried out regarding the information are exactly the same: 1. 2. 3. 4. Order Acknowledgement sent to Customer Order is filed Order and Quote details sent to Purchasing The date the Order was received is written on the Quote Since this task appears to be a repetition of the previous task, it will be ignored in the Data Flow Diagram Task 8 Once all products on an order have been delivered to the customer, the photocopy of the order and quote is passed back to the Sales Administrator from the Purchasing department. The order copy will have the actual date of delivery stamped on it. The Sales Administrator will write the delivery date on the original order and throw away the copy. Remember that the reference to the products being delivered to the customer is referring to a task that is outside the system boundary for this Data Flow Diagram., as are references to physical documents and photocopies There are therefore just two instructions here: 1. 2. Actual Delivery Date of completed order returned from Purchasing Write Actual Delivery Date on Order Appendix B Barnaby Electronics Ltd 27 The first instruction has one Input from Purchasing; Order details with Actual Delivery date of completed order. The second instruction has one Output to the Order Data Store; Actual Delivery Date. The task table for Task 8 will be as follows: Instruction Receive Actual Delivery Date of Completed Order Wrote Actual Delivery on Order B.9 Input Actual Delivery Date Task 8 from Purchasing Output to Actual Delivery Date Order Draw the process Boxes and Data Flows on the Data Flow Diagram Of the original eight tasks, there are now five tasks: 1,3, 5, 6 and 8. Each of these will be added to the Data Flow Diagram as a Process Box, each numbered from 1 to 5. the Inputs and Outputs to each task will be shown as Data Flows to and from the relevant Data Store, External Entity or Task. Each of the five Process Boxes will be given a suitable name, to represent the task: Process Box 1 Process Box 2 Process Box 3 Process Box 4 Process Box 5 Receive and pass on Quote Request Write Quote and send to Customer Receive Order and locate matching Quote Acknowledge matched Order Receive completed Order 28 Mastering Database Design Appendix B Barnaby Electronics Limited - Quotations and Orders Data Flow Diagram Customer Details, Product Details, Qty 1. Receive and pass on Quote Request Customer Details, Product Details, Qty Customer Details, Product Details, Qty Customer Details, Product Details, Qty All Quote Details Customer Customer Details, Product Details, Sales Price, Qty, Exp Del Details Quote 2. Write the Quote and send to Customer Date Order received 3. Receive Order and Locate Matched Order and Quote Details matching quote Order Acknowledgement Barnaby Electronics Ltd 4.Acknowledge matched Order Order detail Order Acknowledgement Appendix B Ord deta Quote Details Order Details Returned Order with no matching Quote Product No., Purch Price, Exp Del Date, Auth. Date Contact Sheet 29