Diagrams

UML DiagramsSectionthe Unified Modeling Language: structure and behaviour diagrams for software design. Structured AnalysisSectioncontext diagrams, levelled data flow diagrams and data dictionaries. Flowchartsdiagramsthe simplest way to draw steps, decisions and loops. The C4 Modeldiagramscontext, containers, components and code: zoomable software architecture diagrams. Architecture Diagramsdiagramspractical system and cloud architecture diagrams and their conventions. BPMN Business Process Diagramsdiagramsevents, activities, gateways and swimlanes for business processes. Diagrams as CodediagramsMermaid, PlantUML and similar tools that render diagrams from text. Entity-Relationship Diagramsmodellingentities, attributes and relationships for database design. Logical Data Modelmodellingturning an ER model into normalised tables and keys. Diagrams That Fit Python (Module-First, Not Class-First)SectionMost Python codebases are organized around modules , functions , and data pipelines — not deep class… Diagram ExamplesSectionSample diagrams by domain: UML for software, ER for databases, topology for networks, DFDs, architecture,…

1. Why Diagram, and the Main Families

A good diagram is a deliberate simplification: it shows one aspect of a system at one level of detail for one audience. Teams diagram to agree on scope, to explain designs to newcomers, to review security and data protection, and to think through problems that are hard to hold in your head. Bad diagrams usually mix levels (servers, classes and business steps on one page) or leave out a legend so nobody knows what a box or arrow means.

Diagram Families by Abstraction Level Context who uses the system, what is outside Context diagram, C4 level 1 Containers and components major parts and how they talk C4, architecture, UML component / deployment Behaviour and process what happens, in which order Flowchart, BPMN, sequence, activity, state Data what is stored and how it moves ER, logical model, DFD, data dictionary Code-level structure classes and objects UML class, object, package Higher rows: fewer details, wider audience. Lower rows: more detail, technical audience.

No single notation covers everything. UML (Unified Modeling Language, standardised by the OMG) is one family with fourteen diagram types for software structure and behaviour. Structured analysis (context diagrams and data flow diagrams) follows data through a system. Entity-relationship diagrams model stored data. BPMN models business processes with roles and events. The C4 model gives a lightweight, zoomable way to show software architecture. Flowcharts remain the simplest way to show logic. And diagrams as code lets you keep any of these as text in version control.

2. How to Choose

Beginners should start with three questions. Who is the audience? What one question should the diagram answer? What level of detail is right? Then pick the matching diagram below, add a title and a legend, and keep it to what fits on one screen. If a diagram needs a paragraph of caveats, split it into two.

3. Which Diagram Answers Which Question

QuestionDiagramFamily
What is in scope and who interacts with the system?Context Diagram, C4 System ContextStructured analysis, C4
How does data move and where is it stored?Data Flow Diagram, Data DictionaryStructured analysis
What are the major services and how do they connect?Architecture Diagrams, C4 ModelArchitecture
What are the steps and decisions in this logic?Flowcharts, ActivityFlowchart, UML
Which people and teams do what in a business process?BPMNBPMN
What can users do with the system?Use CaseUML
Which messages are exchanged, in what order?Sequence, Communication, Interaction OverviewUML
How does one object change state over its life?State Machine, TimingUML
What classes exist and how are they related?Class, Object, PackageUML
What are the deployable parts and their interfaces?Component, Composite StructureUML
Which software runs on which hardware?DeploymentUML
What entities are stored and how are they related?ER Diagram, Logical Data ModelData modelling
How do I keep diagrams versioned with code?Diagrams as CodeTooling

4. Further Reading