useWorkspace.AI
Sign InGet Started

Data I/O Shape

Learn how to use the Data I/O parallelogram shape for input and output operations in ISO 5807 flowcharts

Last updated: January 13, 2025
6 min read read

Data I/O Shape

The Data I/O shape is a parallelogram that represents general input or output operations in your flowchart. It's used for any data entering or leaving the process.

What is a Data I/O Shape?

The Data I/O shape (Input/Output or I/O Parallelogram) represents:

  • Reading data from any source
  • Writing data to any destination
  • General input operations
  • General output operations
  • Data transfer between systems

According to ISO 5807, this shape is the standard symbol for any input/output function.

When to Use

Use the Data I/O shape for:

  • Reading data: "Read configuration file", "Get user input", "Fetch from API"
  • Writing data: "Write to log", "Save results", "Export data"
  • Console I/O: "Print message", "Read command", "Display output"
  • File operations: "Load CSV", "Save JSON", "Read settings"
  • Network I/O: "Send HTTP request", "Receive response", "Call API"

ISO 5807 Standard

According to ISO 5807, the Data I/O symbol is defined as:

  • A parallelogram shape (slanted rectangle)
  • Used for general input/output operations
  • Represents data entering or leaving the process
  • The default choice when specific I/O shapes don't apply

More specific I/O shapes exist for specialized operations (Manual Input, Display, Document, etc.).

Visual Appearance

In DiagramKit.AI, the Data I/O shape appears as:

  • Dimensions: 160×70 pixels
  • Color: Light green (#f0fdf4)
  • Border: Green (#16a34a)
  • Shape: Parallelogram slanted to the right

Best Practices

✅ Good Usage

[Start]
   ↓
[Read input file]
   ↓
[Process data]
   ↓
[Write output file]
   ↓
[End]
  • Use clear I/O labels indicating what data and where
  • Specify the source or destination when relevant
  • Use consistent verb (Read, Write, Get, Send, etc.)
  • Keep labels concise but descriptive

❌ Avoid

  • ❌ Processing: "Calculate total" (use Process shape)
  • ❌ Decisions: "Check if valid" (use Decision shape)
  • ❌ Too vague: "Get data" (from where?)
  • ❌ Multiple operations: "Read and validate input" (split them)

Common Examples

Example 1: File Processing

[Start]
   ↓
[Read CSV file]
   ↓
[Parse records]
   ↓
[Transform data]
   ↓
[Write JSON file]
   ↓
[End]

Example 2: API Integration

[Start]
   ↓
[Send API request]
   ↓
[Receive response]
   ↓
[Parse JSON]
   ↓
[Display results]
   ↓
[End]

Example 3: User Interaction

[Start]
   ↓
[Display prompt]
   ↓
[Read user input]
   ↓
[Validate input]
   ↓
[Show confirmation]
   ↓
[End]

Label Writing Guidelines

Strong Labels (Recommended)

  • "Read user credentials from database"
  • "Write log entry to file"
  • "Fetch product data from API"
  • "Send email notification"
  • "Export report as PDF"

Weak Labels (Avoid)

  • "Input" (too vague - what input?)
  • "Output" (where to?)
  • "Get data" (from where?)
  • "Save" (save what, where?)

AI Prompt Tips

Use these prompts to add Data I/O shapes with AI:

add an input step to read user data
insert an output operation to save results
create an I/O step that fetches from API
add data input from configuration file

Programming Equivalents

Data I/O shapes represent input/output operations:

JavaScript/TypeScript:

// Input operations
const data = await fs.readFile('input.json');  // Read input file
const response = await fetch('/api/data');     // Fetch from API
const userInput = prompt('Enter name:');       // Read user input

// Output operations
await fs.writeFile('output.json', data);       // Write output file
console.log('Result:', result);                // Display output
await sendEmail(recipient, message);           // Send email

Python:

# Input operations
with open('input.txt', 'r') as f:  # Read input file
    data = f.read()
user_input = input('Enter name: ')  # Read user input
response = requests.get('/api/data')  # Fetch from API

# Output operations
with open('output.txt', 'w') as f:  # Write output file
    f.write(data)
print('Result:', result)  # Display output

Pseudocode:

Input: Read customer_data from database
Process: Calculate total_purchases
Output: Write report to file "monthly_report.pdf"

Specialized I/O Shapes

While Data I/O is the general-purpose I/O shape, use specialized shapes when appropriate:

| Use Data I/O | Use Specialized Shape | |--------------|----------------------| | File read/write | Document if it's a paper document | | API calls | Cloud if it's a cloud service | | General input | Manual Input if typed by user | | General output | Display if shown on screen | | Data storage | Database if database operation | | File storage | Stored Data if file storage |

I/O Patterns

Input → Process → Output

[Read sensor data]
   ↓
[Apply calibration]
   ↓
[Write to log]

Multiple Inputs

[Read config file]
   ↓
[Read user prefs]
   ↓
[Merge settings]
   ↓
[Process]

Conditional Output

[Process data]
   ↓
<Is valid?>
  ↙      ↘
Yes      No
 ↓        ↓
[Write   [Write
 to DB]   error.log]

Input vs Output Direction

While the parallelogram doesn't change shape, you can indicate direction in the label:

Input Operations (data coming IN):

  • "Read...", "Load...", "Fetch...", "Get...", "Receive..."
  • "Import...", "Scan...", "Accept..."

Output Operations (data going OUT):

  • "Write...", "Save...", "Send...", "Export..."
  • "Print...", "Display...", "Emit...", "Publish..."

Connections

Data I/O shapes typically connect:

Input from:

  • Start symbols (first operation)
  • Process shapes (before getting data)
  • Decision shapes (conditional I/O)
  • Other I/O shapes (chained operations)

Output to:

  • Process shapes (to handle the data)
  • Decision shapes (to validate I/O)
  • Other I/O shapes (chained operations)
  • End symbols (final output)

Common Mistakes

Mistake 1: Using for Processing

Wrong: [Validate email format] (Data I/O shape) ✅ Correct: [Validate email format] (Process shape)

Mistake 2: Too Generic

Wrong: [Input]Correct: [Read customer ID from form]

Mistake 3: Multiple Operations

Wrong: [Read file and validate format]Correct: Split into [Read file] (I/O) and [Validate format] (Process)

Mistake 4: Wrong Shape for Specific I/O

Wrong: [Type username] (Data I/O) ✅ Correct: [Type username] (Manual Input shape)

Error Handling with I/O

[Attempt to read file]
   ↓
<File exists?>
  ↙        ↘
Yes        No
 ↓          ↓
[Read data] [Read from
 from file]  backup]
   ↓          ↓
[Process]  [Process]

Stream and Batch Operations

Stream Processing

[Open input stream]
   ↓
   ┌←←←←←←←←←←←┐
   ↓           ↑
[Read next    ↑
 record]      ↑
   ↓           ↑
[Process]     ↑
   ↓           ↑
<More data?>  ↑
   ↓ Yes ←←←←←┘
   ↓ No
[Close stream]

Batch Operations

[Read entire file]
   ↓
[Split into batches]
   ↓
[Process each batch]
   ↓
[Write all results]

Related Shapes

Pro Tip: Always specify the source or destination in your I/O labels. Instead of "Read data", use "Read data from config.json" or "Read customer data from API".

Next Steps