ERDs, STDs and DFDs
Slides in this set (17)
-
- When presented in the form of pictures and diagrams, people are very good at seeing patterns and relationships in data.
- Diagrams can be used to:
- Demonstrate the proposal to the client
- show how the current system works
- Show how the new system works
- Demonstrate how data flows in and out of the system
- Visually show how processes interact
- Act as a guide to the development of the system
- Become part of the documentation for the system

- Caption: Modelling Data and Systems
-
Entity Relationship Diagrams (ERD)
- A system can be represented as a collection of one or more 'objects', 'things' or 'entities'.
- For example a school is made up of one or more buildings each of which contain classrooms, each classroom has a number desks, chairs and so on.
- Attributes
- A single word such as 'school' only provides the very minimum of detail about the object - in your mind you be thinking about its size, buildings, name and so on. These are called 'attributes'.
- An attribute describes one aspect of the entity.
- Attributes should be independent of one another - for example if you had a simple physical box, you could choose to use an attribute called 'colour' but then for some reason you also chose an attribute called 'shade'. Now these are describing almost the same thing - a poor of attributes can cause uncertainty. The image below shows a set of attributes for two entities names Product and Supplier.

- Caption: Entities and Attributes
-
- Drawing an entity relationship diagram
- There are a number of ways to represent an entity. You just need to choose one and stick to it. A common form is to have a simple box with the name of the entity at the top and a list of its attributes below. Entities may have attributes such as 'ID' to act as the primary key, this will allow each instance of the entity to be completely unique.

- Caption: ERD - Primary key and Foreign key
-
- One to One
- In this case there is only one entity either side of the relationship. It is shown as a single line between entities.
- One to Many
- In this case one entity may be related to many instances of another entity. it is shows as a line with a small three pronged branch at one end.
- Many to Many
- In this case each entity is related to many instances of another entity.
- This cannot be directly implemented into a database. A linking entity will need to be created to relate the two main entities together. The new entity must contain two foreign keys from each entity. The foreign key is on the many side of the diagram.

-
- Systems will often have definitive stages - for instance a traffic light system can be on red, red and amber, amber, green.
- These are called the 'states' of the system.
- To move from on state into another a 'transition event' takes place i.e. something causes the traffic light to move from one state to another. In the case of a traffic light to move from one state to another. In the case of a traffic light, a straightforward timer is controlling the system, but transition events can be anything.
- This can be applied to a bank account system. The states of the account could be:
- empty
- money present
- overdrawn
- overdraft limit reached
- Events occur to move between these four stages. The main transition events are either 'add money' or 'withdraw money', just how much money you add or withdraw will determine in which state the system will end up.
- All these systems can be represented by a 'state transition diagram'.
-
State Transition Diagrams Continued
- The states will have a name and number to uniquely identify them and the transitions are shown as a line and arrow to show the direction of change. Each transition is also numbered and labelled.
- Traffic light state transition diagram
- The states identified were:
- Red
- Red/Amber
- Amber
- Green

- Caption: Traffic Light System
-
State Transition Diagrams Continued

- Door system state transition diagram
- More than one event can cause a transition between events.
-
- Whilst State Transition Diagrams can show how the system moves from one state to another, sometimes the emphasis is to understand how data is changed as it flows through the system.
- Data flow diagrams can be used instead to show how an organisation handles incoming data such as a customer order.

- Caption: Customer Order DFD
-

- Data Flow
- The path that data takes through the system is represented by an arrowed line. The arrowed line should have a description of the data. The 'Confirm Order Details' process has data flowing into it from the customer. The outcome of the process are represented by three streams of data feeding other processes.
-
- Process
- Data is transformed by a process. A process is anything that causes the data to be changed in some planned way. For instance converting the incoming order into three other types of data.
- A process can be shown by a square box. The box contains a name for the process and a number to help identify it.

- Caption: Process Box
-
- External Entities
- In a DFD, entities that have an effect on the system but are not part of the system have to be defined.
- External entities can be represented as an ellipse. If the external entity appears more than once in the diagram, it should have a line drawn through it.

- Caption: External Entities
-
- Data Store
- Many systems need to keep a persistent copy of data in order to support various processes. The data store can be an electronic one in the form of a database or it could be a physical one in the form of a filing system. It may be useful in the DFD to show the difference between the two by using 'D' to denote an electronic store and 'M' for a paper based data store.
- If the data store needs to be repeated in the system it should ve represented with a double line through the graphic.

- Caption: Data Stores
-
- Extra Rules
- There are some rules regarding allowed data flows. For instance, a flow from one external entity to another external entity is not useful when describing this particular system.
- Another one is to not show data flows going directly from one data store into another one - simply combine the data stores if that is the case and call the composite data store something else.

-
DFD Multiple Level Flow Diagrams
- Complicated Level Data Flow Diagrams
- Complicated data flow diagrams can be several layers deep.
- 'Confirm Order Details' has its own DFD, this explains how the process works. Hiding away this extra detail can stop the top layer of the DFD from becoming cluttered.
- The top layer is often referred to as the context diagram, as it provides an overall view of the system. Multiple processes in the top layer may need to analysed individually, this is where multiple level DFDs become useful.

- Caption: Multiple Level Data Flow Diagram
-

- A flowchart is a diagram that shows the breakdown of a task or system into all of the necessary steps.
- Each step is represented by a symbol and connecting lines show the step-by-step progression through the task.
- In the diagram to the right there is a clear start, series of step, clear direction of flow and a clear end point.
- This is a very simple flowchart. For some tasks or systems, the flowchart can be very complex and detailed.
-

- Flowcharts are meant to be shared other people and so it makes sense that the symbols are standardised:
- Start/End - the terminator symbol marks the starting or ending point of the process. It usually contains the word "Start" or "End".
- Action or Process - a box can represent a single step ("add two cups of flour"), or an entire sub-process ("make bread") within a larger process.
- Decision - a decision or branching point. Lines representing different decisions emerge from different points of the diamond.
- Input/Output - represents material or information entering or leaving the process, such as customer order (input) or a product (output).
- Data storage - indicates a step where data gets stored. For example "Save Orders".
- Delay - indicates a delay in the process. For example "Wait 1 day"
- Caption: Standard Flowchart Symbols
-
- Advantages
- Good way to communicate the details of a task or process to others
- Excellent way of documenting each stage in the process
- Help people analyse problems or bottlenecks in the process
- Specialist flowchart software makes it relatively simple to create and update flowcharts
- When a new system is being developed, flowcharts can act as a guide or blue print for the programmer
- Disadvantages
- some processes or tasks are so complex that it becomes difficult to represent them clearly in a flowchart
- If an alteration needs to be made to the system, the flowchart has to be redrawn
- Flowcharts can be difficult to read to people who are unfamiliar with them
Information
- Description
- A level IT (331 - The systems cycle) Slide Set on ERDs, STDs and DFDs, created by James Tungate on 15/05/2018.
- Created by
- James Tungate · May 2018
- Updated
- May 17, 2018
- Views
- 16
- Rating
More on Entity-Relationship Model and Diagrams