Comparison of Entity-Relationship Diagram (ERD) and Data Flow Diagram (DFD)
Entity-Relationship Diagrams (ERD) and Data Flow Diagrams (DFD) are both widely used in system analysis and design, but they serve different purposes and represent different aspects of the system.
| Aspect | Entity-Relationship Diagram (ERD) | Data Flow Diagram (DFD) |
|---|---|---|
| Purpose | Describes the data and relationships between entities in a system. | Describes the flow of data and the processes that transform the data. |
| Focus | Data structure and relationships. | Data processes and movement. |
| Type of Diagram | Static diagram. | Dynamic diagram. |
| Representation | Entities (represented as rectangles), relationships (represented as diamonds), attributes (represented as ovals). | Processes (represented as circles or rectangles), data flows (represented as arrows), data stores (represented as open-ended rectangles), external entities (represented as squares). |
| Primary Concern | The structure of the system's data. | The flow and processing of data within the system. |
| Level of Detail | Typically shows high-level entities and relationships; does not show processes or workflows. | Often shows multiple levels of abstraction (context-level DFD, child DFDs). |
| Focus Area | Entities (e.g., Customers, Orders), their attributes, and relationships (e.g., one-to-many, many-to-many). | Processes (e.g., Order Processing, Inventory Management), data flows, and interactions between entities and systems. |
| Use Case | Used to model the data structure of a system, often in database design. | Used to model the data flow and processes of a system, especially in system or software design. |
| Best Suited For | Conceptualizing databases, designing relational databases, and representing business rules. | Representing business processes, understanding system requirements, and defining how data moves through a system. |
| Level of Abstraction | More abstract, focusing on "what" data exists and "how" it's related. | Focuses on "how" data flows and is processed within the system. |
| Tools Used | Often used in Database Design tools like ERwin, Microsoft Visio, or UML. | Often used in process modeling tools or software like Microsoft Visio, Lucidchart, or structured analysis methods. |
| Example | Entities: Customer, Order; Relationships: Customer places Order. | Process: Order Processing, Data Flow: Order Data, External Entity: Customer. |
DFD Past Paper Questions to try
- Determining Postage
The customer hands over the letter to the Registration Counter. The Letter is weighted and the postage for the relevant weight is read from a table. The postage is written on the letter by the counter and it is given to the customer.
- Issuing Stamps
The customer hands over the letter with tha postage written on it to the Stamps Counter with the amount of postage. Stamps for the postage and the letter are issued to the customer with any balance due by the Stamps Counter.
- Registering Letter
The Customer sticks tha stamps on the letter and hands it over to the Registration Counter. The Registration Counter accepts the letter, sticks the 'Registered Post' label with a uniques identification code to the letter, keeps the letter and issues a receipt with sender and recipient information with the date and the amount paid, to the customer.
The 3-stae procedure for handling over a letter for registered post to a post office is as follows:
- Context Diagram
- Level I Data Flow Diagram (DFD)
ERD Past Paper Questions to try
Consider the following decription relating to details of players attached to different sports clubs. A Player always belongs to a sports club and he/she can be identified uniquesly by the NIC (National Identity Card) number. Further a palyer has a name which consists of a surname and initials.
A club which is uniquely identified by its name can have many players. A player can paly games. Each game in this context is given a unique code and a description. A player can play more than one game and each game is played by at least one player.
Note: Use only the relevant words in the above description when drawing the Entity-Relationship (E-R) diagrams for the following questions.
- Draw an ER diagram for the above description.
- Extended the ER diagram in above (i) to include the number of hours played by each player for each game.
- Player may have s sponsor who has a unique title. A sponsor can give sponsorship only for one player. Extend further the ER diagram in part (ii) above to include the sponsor's details.
No comments:
Post a Comment