📐 Modelling systems - visual examples
Seven data and system modelling methods with diagrams. Examples are fictional, intended for teaching.
Diagram of enthusiasm and relationship
ERD - Library Domain (Member · Loan · Book)
When to use
At the very beginning, when you have to understand what things (enthities) are in the system and how they are connected to each other - even before creating tables.
Related Standard
Chen ERD (1976), Crow's Foot notation, IDEF1X. Data dictionary is often entered.
Restrictions
Do not show any final tables or business laws. Many to many links should always be divided by an intermediate table.
Objective class diagram
UML Class - Vehicle Hierarchy
When to use
Designing an object-oriented code - to see classes, their fields, methods and succession even before writing.
Related Standard
OMG UML 2.5.1. Also includes sequence, state, activity and employment charts.
Safety Note
private/protected is not a security wall - the code can bypass them (e.g. Java reflection). Real security limits are individual processes or services.
Transformation of a three-layer data model
Conceptual → Logical → Physical (Inventory)
When to use
To gradually get from the business view to the ready database scheme. Each layer is designed for another reader - business, architect, DBA.
Related Standard
ANSI/SPARC three-schema architecture (1975). Nowadays: dbt stagging→intermediate→mart layers follow a similar principle.
Restrictions
In small projects, the conceptual layer is often omitted - but this does not allow business logic to get stuck in the database scheme.
Data flow diagram · Level 1
DFD - Restaurant Order (with trust boundary)
When to use
To see how data flows between people and systems and where they are stored. This is the basis for the modelling of threats.
Related Standard
Yourdon/DeMarco notation. Nowadays - Microsoft Thread Modeling Tool, OWASP pytm, draw.io DFD template.
Safety Note
Each boundary of trust is the place where you have to check who you are (authentication) that you are (authorization) and whether the data is valid (validation). STRIDE starts from it.
Relation normalisation · Unnormalized → 3NF
Normalization - Movie Rentals
When to use
In systems where data are frequently changed and duplication leads to errors (OLTP). Data warehouses (OLAP) often do the opposite - deliberately duplicated due to speed.
Related Standard
Cod, 1NF1:6NF (1970+). Boyce-Coded Normal Form (BCNF) - stricter than 3NF. Practically stop at 3NF/BCNF.
Restrictions
Too much normalisation = much JOIN = slower system. In practice start with 3NF and denormalize only if measurements require it.
C4 architecture model · Level 2 (Container)
C4 Container - Weather Forest Platform
When to use
To describe the system architecture at a high level. The level of the Container indicates the separate parts to be launched - services, databases, external systems.
Related Standard
Simon Brown, c4model.com. arc42 frame (sec. 5 = Building Block View) is often used instead of C4 levels.
Safety Note
The system boundary is the first place to record how authentication takes place, where TLS ends and where audit logs are stored in the system.
Three modeling · Microsoft, 1999
STRIDE - Per-element Three Categories
| DFD Element | S | T | R | I | D | E |
|---|---|---|---|---|---|---|
| External Facility (user, system outside the border) | ✓ | - | ✓ | - | - | - |
| Process (services, lambdas, microservice) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Data Store (DB, files, S3 basket) | - | ✓ | ✓ | ✓ | ✓ | - |
| Data Flow (HTTP/TCP, queue, IPC) | - | ✓ | - | ✓ | ✓ | - |
When to use
After DFD - pass through each element and check which six types of threat (STRIDE) fits it. Every threat found shall be recorded as to how to mitigate it.
Related Standard
Microsoft Three Modeling Tool, OWASP pytm. MITRE ATT&CK adds real tactics. PASTA, LINDDUN - other approaches.
Safety Note
STRIDE does not cover business logic errors, crypto weaknesses or supply chain. It is therefore often combined with OWASP Top 10 and MITRE ATT&CK.