Transcript for:
System Modeling Symbols and Diagrams

good day everybody Welcome to lesson three of part two again it's part two of lesson three which is part two of program and I really need to work on the naming of my videos and my topics but whatever we're here and we're going to talk about the next two design diagrams namely the context diagram and the data flow diagram now these two diagrams we're going to dive deep into looking at how the user sort of interacts with our program what data goes in what comes out where that's stored all that kind of stuff and the first diagram we look at is context diagram again this is a little bit like the IPO diagram in terms of it is Big Picture stuff it shows the users who are going to use our program it shows our program in the middle and it shows how the data sort of goes from one place to another okay and we'll look at some examples in a second but I want to introduce you to the icons of our level zero or context diagram there are circles just as you can see here there is arrows that you write your data on top of or below and there is rectangles that represent our external entities which are users or other businesses that our program interacts with so let's quickly jump into a diagram because I feel like people learn better with examples and then you can write down the symbols come on click and let me move my big fat head over who all right we in this diagram are looking at a voting system and our voting system is sitting in our process Circle in the middle so with a context diagram it's quite often you only see a single Circle which represents all the software and all of the hardware and this is unique to the context diagram just one Circle system name in the middle simple as that then you have the rectangles or the squares on the outside which are essentially the users or anyone that you would interact with so we've got the candidates for our voting system and their details as you can see if you follow our data flow line down and in the arrowheads are very important by the way make sure they're pointing the right direction that indicates that the candidates are sending inputs into our voting system so somewhere in our input di or IPO diagram there would be candidate details and in the context diagram where we're now thinking of where do they come from well they come from the candidates themselves so that's an input into our system and you write on the line the candidates details that they're providing to our system okay I've hammered on about that then we've got another external entity a voters well they interact with our voting system of course they do they provide their details and their actual vote and so that input line indicates the voters details and their vote going into the voting system okay never there's an other Arrow coming back so that's an output something that's coming out of our system again on our IPO diagram confirmation will be written under under the O column to indicate the confirmation going back to the voter okay so you can see the context diagram sort of takes the next step from an IPO diagram it actually looks at oh okay there's an output but who is it going to sometimes you can have 15 different outputs and they're all going to different places but the IPO diagram doesn't show that the context diagram does and then we got one more little external entity the public the rest of the General Public they get the election results from our software so output election results into the public so they can see what was the result of the voting okay so you can see our three little icons in full action here the process is just like the entire system Hardware software everything the arrows represent the data flows inputs and the outputs from our exteral entities which often are people who use our system but it can often be external people or sorry external businesses like Banks if your system has got handling processes or handling processing of money often you would use a bank for that so you would have an external entity to represent the bank to process those payments okay so let's jump forward testing yourself we're going to jump into our canteen app okay I want you to draw a context diagram you should have one process for the entire canteen app so we're not thinking about the one screen now I want you to think about the entirety of the app you should have an external entity for the student an external entity for the canteen staff some data flowing connecting the students and the staff with that system in the middle and then I want you to write the inputs from the students the outputs from to the students and then the inputs to the canteen staff and if there's any outputs and Etc so again I'm going to pause and so are you guys and you're going to draw your own context and then I'll jump into whiteboard and we'll have a go okay welcome back I hope you've had a go let's jump into the deep end so the first thing I would quickly recommend when you're doing a context diagram specifically context I I emphasize that because data flows are similar but not similar enough the first thing I would do is write the name of the app in the middle such as canteen app and then I would draw oh my God I can't do circles I should use the shapes down here let's get a circle I don't want to I've already written it Microsoft okay beautiful now how do I move it cool now the reason I emphasize right then do the circle is often I have students they will draw a lovely wh thank you for that Microsoft they'll draw a lovely circle like that and then they'll like right canteen and I just can't write it so please make sure you use the right thing okay let's see if this arrays is actually going to do its job beautiful Okay so we've got our process in the middle we've got our canteen app ready to go let's get some external entities let's draw the shapes first so one rectangle is going to have to be the students and then one rectangle is going to be the staff or the canteen staff you can write either one okay with that said and done what we need to do now is think about all right how do we connect these two things together okay how are we going to connect the students to the app and the staff to the app well it's pretty straightforward first thing let's grab a line draw it going into the canteen app what are the students provide for the canteen app will they provide their details okay payment because we're just going to assume that this app is communicating um you know with the bank directly and those kind of things and finally what their order is that's probably more important thing is they want meat pie they want a cheeseburger all that kind of stuff now what do they get out of the software now you might be tempted to write food but realistically the food comes from the staff so but what do they get back they get confirmation of their order and they might get an invoice or a receipt whatever you want to call it that kind of stuff coming back to the students now what did the staff get well they get the orders they get the order info okay who's the student who what do they order those kind of things do the staff put anything into the canteen well they might put maybe a new special comes up special specials what about food items maybe they got new food items on the menu that kind of stuff that's what they put into the app now there is one more external entity if you want to get very very picky and I've already sort of mentioned it so let's quickly add in a rectangle that external entity would be the bank okay the bank is what's going to handle all the hard work when it comes to things like handling payments and all that so let's move this down so the Cain app is going to send the payment info to the bank and the bank is going to Simply send back confirmation or if it worked or it didn't work okay and there is our context diagram for our canteen app and again context diagrams are just that they are putting everything into context okay and this is where things are going to get a little bit complicated because we're going to dive into the data flow or the DFD diagram okay a data flow diagram is essentially like the next step okay we've got our context diagram but now we need to look at what are the individual processes from our IPO diagram that are going on where is the data going to be stored as well so there's a little bit more work involved in a data flow there are similar icons as you can see we've still got our process we've still got our external entities and we've still got our data flow lines but we've now got this three-sided rectangle now it doesn't matter if this side or the other side is open it's the same symbol but it indicates data storage it could be a text file it could be a database it could even be a filing cabinet for God's sake or a set of sticky notes on someone's desk wherever you store your data it goes into that open rectangle like that okay so these are our four symbols there's one quick thing I want to point out before we look at our example the process isn't just representing the whole system anymore we are representing how the inputs become outputs or how the data gets stored so a quick example of that in the last one the canteen app was just one big circle and everything went into the one Circle well now the Cante app would be broken into multiple bubbles one bubble would be making the orders one bubble would be processing the payments another one would be emailing staff about the orders that have been made all that kind of stuff so no longer do we see one bubble we now have multiple processors in our system now this example data flow diagram is a really simple data flow for searching for songs on Spotify so as you can see I've got one external entity I've now got three processes and one data store okay this isn't as one of my students put it this isn't the screen shot of a diagram with the edge cut off that is the data Store icon so the user would send in a search term which then sends it onto the database to have a look at what songs are in the database and it would send back the results to another process which would format them in a nice pretty little way that the user can see and then finally the user would choose a song which then is played by Spotify so this is a really really simple search see your results play a song kind of thing from Spotify okay and again we the external entities are the same you can have businesses or people in data flows the processes though are now just individual like chunks of code that are going to process inputs and outputs and these three-sided rectangles are where you store your data okay now that's a much more complicated one using the voting system that we had before let's have a quick look okay we've got the three external entities still exist there's the voters the candidates and the public let's start with the candidates because that's what we did last time so the candidates send their details into the nomination process and those details are then stored inside this endorsed candidates database the voters send in their vote to a vote process which is saved in here they get the list of candidates as well and then there is an electoral role so in other words where the voters details are stored to say this voter has voted or not and the result is sent back here which goes back to the user as confirmation you're going to see that a lot and then the last thing we've got is all the details and the votes are brought together into this results process which is sent to the public so you'll notice that external entities in a data flow diagram don't talk to databases and that's for security reasons code needs to talk to databases not people okay and you'll also notice again that data doesn't go straight to people it has to go through a process again so you'll often see that inputs go to a circle then go to a data store or output goes to a process and then goes to an external entity so let's go back to our Cantina very quickly let's have a look at the external entities let's have a look at the data stores let's have a look at the processes and the data flows so I want to see two external entities again student and staff I want to see two data stores or maybe one depending on how you want to structure it for the orders and then the menu for the canteen I want to see at least two processes for viewing the menu and ordering the food and I want to see the data flow lines connecting them all together so pause the video have a go and then I'll do it on the Whiteboard again okay we are back let us draw our diagram the first thing is I want to think about the external entities I always tend to start with the rectangles because I find it a little bit easier so I'm going to try and structure it similar to the last one we put staff on the left hand side we'll put students on the right hand side why did that make a tiny one whatever okay we'll put students over here and the first thing I think of is all right what inputs do my external entities provide for my whole system well the simplest one again is the student details so actually I'm not going to write student details my undo is not working and I don't appreciate it Microsoft okay let's just get that so let's just put details what was it it was payment and Order okay that is now going to go into well not now because it was the same in the last one it's going to go to a process but this time the process is now going to be named okay so let's call this create order and we need to think about all right so now all the details have gone into here where are they going to end up where is the basically the end result for this stuff well it's going to go to a data store and I'm going to put it at the top here and I'll tell you why in a second so a three-sided rectangle and this is going to be the orders database like so what info is going into there again it's going to be the details and it's going to be the order as well goes into the database now where does that go once it's in the database well it needs to get to the staff but again you cannot connect a data store and an external entity or you shouldn't it's going to go through a process so let's go orders they go into a circle okay and I'm just going to call this one print orders so you just imagine like there's a bit of paper and we'll just call this report so you imagine there's a bit of paper that just goes straight to the staff that says you got 15 orders to make lunch okay that's what I'm talking about there with the print orders now the other thing I want to quickly touch on we've got payments that disappeared when it went into the ORD database and that's because it's going to go to its own process down here so let's get another Circle pop it there make it smaller and I'm going to call this process payment and this guy is going to take the payment details and it's going to contact the bank so lots of back and forth and I'll tell you why I draw those lines in a second so payment just writing the same words again and again but that's fine external entity this is the bank that's handling all the fs and all that kind of stuff I about to write Commonwealth again I undo sorry about this guys nice and slow process today you'll write bank and they're simply going to send us back confirmation because they handle everything else on their end and the confirmation is going to go all the way back to this process and the confirm is going to go back to the student as well that's a bit messy I probably should have spaced it out more but there we go so this is the main setup there is one chunk that is missing though on the exam on sorry on this test yourself page I said I want you to have a data store for the menu so the students should be able to essentially scroll through the menu of different items so let's do it up here okay well actually there's not going to be any error going oh my God no inputs no undos okay we're gonna have a view process like so plump that there over the top make it a bit smaller okay and that data has got to come from a menu database so this is where all of our food exists and let's just put menu items and that's going to go down to the students menu items so that would include names prices categories all that kind of stuff so there is a really basic data flow diagram for our canteen app and it includes all the things that I talked about now I haven't included like the staff adding specials I have it included adding new items all that kind of stuff but let's just keep it simple for today it's your first time so hopefully at the end of this video you understand a bit more about context diagrams and data flow diagrams in the next video because this is getting long we're going to look at structure charts and data dictionaries so I'll see you in that one