Documentation · Process
Data flow diagram
Declare the external entities, processes and data stores, then name every flow with the data it carries. Every flow passes through a process.
When to use it
Show how data moves through a system — from external entities, through numbered processes, into and out of data stores — at context level, level 0 or level 1.
Name every flow with the data it carries. A process needs at least one input and one output, and an entity never talks directly to a store or another entity.
Working example
Copy this complete example into the Source tab, then press Generate. Change its labels or values to make your first version.
dfd "Online Shop - Level 0" {
entity CUST "Customer"
entity BANK "Bank"
process P1 "Place Order"
process P2 "Process Payment"
process P3 "Ship Order"
store ORDERS "Orders"
store STOCK "Inventory"
CUST -> P1 "Order details"
P1 -> ORDERS "New order"
STOCK -> P1 "Stock level"
P1 -> P2 "Amount due"
P2 -> BANK "Payment request"
BANK -> P2 "Payment confirmation"
P2 -> P3 "Paid order"
ORDERS -> P3 "Order lines"
P3 -> STOCK "Stock update"
P3 -> CUST "Delivery note"
}Syntax reference
The same reference used by the editor and AI briefing. Syntax is notation-specific; use the keywords listed here.
Diagram
| Syntax | Meaning |
|---|---|
dfd "Title" { | open a data flow diagram (Gane–Sarson) |
Shapes
| Syntax | Meaning |
|---|---|
process ID "Verb + noun" | process, numbered 1, 2, 3 in order written |
process ID "Check stock" "1.2" | process with its own number (level 1) |
entity ID "Name" | external entity: a source or a sink |
store ID "Name" | data store, coded D1, D2, D3 in order written |
store ID "Orders" "D3" | data store with its own code |
Flows
| Syntax | Meaning |
|---|---|
A -> B "Data name" | data flow, named with the data it carries |
A [Data name] -> B | the same, caption in brackets |
# comment | line comment (also //) |
Language rules
- The file is one dfd "Title" { ... } block, in Gane–Sarson notation.
- Name a process with a verb and a noun (Validate Order), an external entity and a data store with a noun.
- Every data flow has a process at one end at least. An entity never connects straight to another entity or to a store, and a store never connects straight to another store.
- Every process has at least one flow in and one flow out: none that only takes data in (a black hole) or only sends it out (a miracle).
- Name every flow with the data it carries: CUSTOMER -> P1 "Order details". A caption in quotes names one flow; a chain takes captions in brackets.
- Processes are numbered 1, 2, 3 and stores coded D1, D2, D3 in the order written; give a process "1.1" or a store "D3" after its name to set it, as a level-1 diagram does. An entity carries no number.
Edit on the canvas
- Move and rename shapes on the sheet; a flow's caption moves with its line.
- Draw a data flow from the rail. Keep a process at one end of every flow.
Generate replaces the drawing from source. Save before generating again if you want to preserve manual finishing touches.
Read Saving & exportingWrite it with an assistant
Tingraph AI already knows this notation. For another assistant, copy the tutorial below, describe your diagram under MY DIAGRAM, then paste the returned source into the editor. This prompt includes every syntax row, rule and working example above.
Read the complete prompt
You are writing Tingraph source. Tingraph is a small text language that draws a data flow diagram (Gane–Sarson). Answer with Tingraph source only.
SYNTAX
Diagram
dfd "Title" { open a data flow diagram (Gane–Sarson)
Shapes
process ID "Verb + noun" process, numbered 1, 2, 3 in order written
process ID "Check stock" "1.2" process with its own number (level 1)
entity ID "Name" external entity: a source or a sink
store ID "Name" data store, coded D1, D2, D3 in order written
store ID "Orders" "D3" data store with its own code
Flows
A -> B "Data name" data flow, named with the data it carries
A [Data name] -> B the same, caption in brackets
# comment line comment (also //)
RULES
- The file is one `dfd "Title" { ... }` block, in Gane–Sarson notation.
- Name a process with a verb and a noun (`Validate Order`), an external entity and a data store with a noun.
- Every data flow has a process at one end at least. An entity never connects straight to another entity or to a store, and a store never connects straight to another store.
- Every process has at least one flow in and one flow out: none that only takes data in (a black hole) or only sends it out (a miracle).
- Name every flow with the data it carries: `CUSTOMER -> P1 "Order details"`. A caption in quotes names one flow; a chain takes captions in brackets.
- Processes are numbered 1, 2, 3 and stores coded D1, D2, D3 in the order written; give a process `"1.1"` or a store `"D3"` after its name to set it, as a level-1 diagram does. An entity carries no number.
WORKED EXAMPLE
dfd "Online Shop - Level 0" {
entity CUST "Customer"
entity BANK "Bank"
process P1 "Place Order"
process P2 "Process Payment"
process P3 "Ship Order"
store ORDERS "Orders"
store STOCK "Inventory"
CUST -> P1 "Order details"
P1 -> ORDERS "New order"
STOCK -> P1 "Stock level"
P1 -> P2 "Amount due"
P2 -> BANK "Payment request"
BANK -> P2 "Payment confirmation"
P2 -> P3 "Paid order"
ORDERS -> P3 "Order lines"
P3 -> STOCK "Stock update"
P3 -> CUST "Delivery note"
}
OUTPUT
- Reply with one fenced code block and nothing else.
- The block starts with `dfd "…" {` and ends with `}`.
- Do not invent keywords: use only the ones listed above.
- Keep labels short enough to read inside a box, and keep every ID unique.
MY DIAGRAM
Describe what you want here, then send this message.Something unclear? Contact support or read the Privacy Policy.