This page teaches students how to create DFD (Data Flow Diagrams) and ER (Entity-Relationship) diagrams for their final year projects. Includes Level 0, Level 1, Level 2 DFD explanations, ER diagram relationship types, examples for common project types, and free downloadable templates.

DFD and ER diagram guide for final year projects

DFD and ER diagrams are the two most-asked-about diagrams during project viva. Evaluators use them to judge whether you understand your own system design. This guide shows you how to create accurate diagrams for common project types, with downloadable templates.

What is a Data Flow Diagram (DFD)?

A Data Flow Diagram shows how data moves through your system. It visualizes the flow of information between external entities (users, external systems), processes (functions that transform data), and data stores (databases, files). Every final year project report should include at least a Level 0 (context diagram) and Level 1 DFD.

DFDs use four standard symbols:

  • External entity (rectangle) — a user, system, or organization that interacts with your system
  • Process (circle or rounded rectangle) — a function that processes or transforms data
  • Data store (open-ended rectangle) — where data is stored (database, file)
  • Data flow (arrow) — the direction data moves between components

Level 0 DFD (context diagram)

The Level 0 DFD shows your entire system as a single process in the center, with external entities connected to it by data flows. It gives a high-level overview of what goes in and comes out of your system. Every project has exactly one Level 0 diagram.

Example for a student management system: The central process is "Student Management System." External entities are "Student" (provides registration data, receives marks), "Admin" (provides course data, receives reports), and "Faculty" (enters attendance, views student list). Data flows show what information moves between each entity and the system.

Level 1 DFD

The Level 1 DFD breaks the single central process into its major sub-processes. For a student management system, you might have processes like "Register Student," "Manage Courses," "Record Attendance," "Generate Reports," and "Manage Grades." Each process connects to relevant data stores (Student DB, Course DB, Attendance DB) and external entities.

Level 1 should have 4-8 processes. More than 8 means you need to decompose further into Level 2 diagrams for specific processes.

Level 2 DFD

Level 2 diagrams decompose individual Level 1 processes into more detailed sub-processes. For example, the "Register Student" process from Level 1 could be broken into "Validate Input," "Check Duplicate," "Create Record," and "Send Confirmation." Not all projects need Level 2 diagrams — include them only for complex processes.

Common DFD examples for final year projects

E-commerce application DFD

External entities: Customer, Admin, Payment Gateway. Level 1 processes: Browse Products, Search Products, Manage Cart, Process Order, Handle Payment, Manage Inventory, Generate Reports. Data stores: Product DB, Order DB, User DB, Payment DB.

Hospital management system DFD

External entities: Patient, Doctor, Admin, Lab. Level 1 processes: Register Patient, Schedule Appointment, Manage Records, Process Billing, Generate Reports. Data stores: Patient DB, Appointment DB, Medical Records DB, Billing DB.

Machine learning prediction system DFD

External entities: User, Admin. Level 1 processes: Collect Input, Preprocess Data, Run Prediction Model, Display Results, Store History, Retrain Model. Data stores: Input Data DB, Model Store, Prediction History DB, Training Dataset.

What is an Entity-Relationship (ER) diagram?

An ER diagram shows the structure of your database — the tables (entities), their columns (attributes), and the relationships between tables. It is a blueprint of your database design and is essential for the system design chapter of your project report.

ER diagrams use these symbols:

  • Entity (rectangle) — a database table (User, Product, Order)
  • Attribute (oval) — a column in the table (name, email, price). Primary keys are underlined.
  • Relationship (diamond) — how entities are connected (has, belongs to, places)
  • Cardinality — 1:1, 1:N (one-to-many), N:M (many-to-many)

Types of relationships

One-to-One (1:1) — one record in Table A relates to exactly one record in Table B. Example: User has one Profile.

One-to-Many (1:N) — one record in Table A relates to many records in Table B. Example: one Category has many Products. This is the most common relationship.

Many-to-Many (N:M) — many records in Table A relate to many records in Table B. Example: Students enroll in many Courses, and each Course has many Students. This requires a junction table (Enrollment).

Common ER diagram examples

E-commerce ER diagram

Entities: User (user_id, name, email, password, address), Product (product_id, name, price, description, category_id), Category (category_id, name), Order (order_id, user_id, total, status, created_at), OrderItem (id, order_id, product_id, quantity, price), Payment (payment_id, order_id, amount, method, status). Relationships: User places Order (1:N), Order contains OrderItem (1:N), Product belongs to Category (N:1), OrderItem references Product (N:1).

Student management ER diagram

Entities: Student (student_id, name, email, enrollment_no, branch), Course (course_id, name, credits, semester), Faculty (faculty_id, name, department), Attendance (id, student_id, course_id, date, status), Grade (id, student_id, course_id, marks, grade). Relationships: Student enrolls in Course (N:M via Enrollment), Faculty teaches Course (1:N), Student has Attendance (1:N), Student has Grade (1:N).

Tools for creating DFD and ER diagrams

  • Draw.io (diagrams.net) — free, browser-based, supports all diagram types. This is what we recommend for students.
  • Lucidchart — professional diagramming tool with a free tier for students
  • Microsoft Visio — part of Office 365, available through most university licenses
  • StarUML — free for academic use, focused on UML diagrams
  • dbdiagram.io — specialized for ER diagrams, uses a simple DSL to generate diagrams

Common mistakes in project diagrams

  • Missing data stores in DFD — every process that stores or retrieves data should connect to a data store
  • Data flowing between two external entities — data must always pass through a process
  • Inconsistent naming — use the same names in your DFD, ER diagram, and code
  • Missing primary keys in ER diagrams — every entity must have a primary key (underlined)
  • No cardinality labels — always show 1:1, 1:N, or N:M on relationship lines
  • Hand-drawn diagrams — use proper tools. Hand-drawn diagrams look unprofessional and are often unclear

Download diagram templates

We have prepared ready-to-use DFD and ER diagram templates for common project types (e-commerce, management system, ML prediction, social media). These templates are in draw.io format and can be edited in your browser for free. Fill in the form below to download.

Download free diagram templates template

Fill in your details to get instant access. No spam, we promise.

Get projects with professional diagrams included

Every project from CodeAj includes system architecture diagrams, DFDs, and ER diagrams in the project report. These are professionally created, accurately representing the actual system design. Save hours of diagramming work and focus on understanding your project.

Frequently asked questions

At minimum, include Level 0 (context diagram) and Level 1. If your project is complex (7+ modules), add Level 2 for the most important processes. Most evaluators are satisfied with Levels 0 and 1.

Yes. DFDs show data flow (how data moves through the system) and ER diagrams show data structure (how data is stored). They serve different purposes and evaluators expect both in your report.

Some universities accept UML diagrams (use case, sequence, activity) instead of or in addition to DFDs. Check your department guidelines. If unsure, include both DFD and at least a use case diagram.

A DFD shows data flow between processes and stores. A flowchart shows the logical sequence of steps in an algorithm. DFDs are for system-level design; flowcharts are for function-level logic.

We recommend draw.io (diagrams.net) — it is free, browser-based, and supports all diagram types. For ER diagrams specifically, dbdiagram.io is also excellent and uses a simple text-based syntax.

Yes. Your DFD should accurately represent your system. If your code has a user authentication module, it should appear as a process in your DFD. Evaluators compare your diagrams with your actual implementation during viva.

⭐ 98% SUCCESS RATE
  • Full Development
  • Documentation
  • Presentation Prep
  • 24/7 Support