3.4UML diagrams & databases
The essentials in 30 seconds
- Visio creates diagrams in the SOFTWARE/IS domain: UML (object-oriented systems modeling) and DATABASE diagrams — to model and document systems (developers, analysts, architects).
- UML: CLASS diagram (structure: classes, attributes, methods, relationships — the most used), SEQUENCE (interactions over time), use cases, activity, etc.
- DATABASE Schemas: ENTITIES-RELATIONSHIPS model (tables/entities, fields, primary/foreign keys, relationships with cardinality) — to design, document, understand a database.
Ongoing mini-case — Nadia applies “UML diagrams & databases”
Nadia, quality and organization manager in a service SME in Algiers, must create UML diagrams (classes, sequence) and database schemas (entities-relations) with standardized notations. She starts from “UML Diagrams & Databases” and follows the procedure: Create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) — standardized symbols. Discover the sequence diagram (interactions between objects over time, sequence of messages). Create a database schema (entity-relationships): tables (entities) with their fields and keys, linked by relationships with their cardinality. Respect the standardized NOTATIONS (UML, ER) for understanding; for intensive work, note that specialized tools (code/SQL generation) go further. Expected result: You create UML diagrams (classes, sequence) and database schemas (entity-relationships) with standardized notations — the standard tools for modeling and documenting software and IS systems.
Ongoing case from section 3.4: it comes back in the script and the 48 hour challenge.
1. The UML
Visio allows you to create technical diagrams in the SOFTWARE and INFORMATION SYSTEMS domain: UML diagrams and database diagrams. These diagrams are used to MODEL and DOCUMENT computer systems — useful for developers, analysts, software architects and database designers. The UML (Unified Modeling Language) is a STANDARDIZED modeling LANGUAGE for designing and documenting object-oriented software systems. It includes several types of diagrams, each modeling an aspect: the CLASS diagram (the structure: classes, their attributes, their methods, their relationships — inheritance, association) — the most used; the SEQUENCE diagram (the interactions between objects over time, the sequence of messages); the use case, activity, state, component diagram, etc. Visio provides UML models and templates with standardized symbols for each type of diagram.
2. Databases
Database schemas: they model the structure of a database — the TABLES (entities), their FIELDS (columns/attributes), KEYS (primary, foreign) and RELATIONS between tables (links, with their cardinality: one-to-many, many-to-many, etc.). The entity-relationship (ER / entity-relationship) model is the classic representation: entities (tables) linked by relationships. These diagrams are used to DESIGN a base (before creating it), DOCUMENT it, UNDERSTAND it. Visio provides database models (entity-relationship schema, Crow's Foot notation, etc.). Important points. (1) These diagrams follow STANDARDIZED NOTATIONS (UML, ER notations) — respecting them is essential for them to be understood by professionals (as with the flowchart or the BPMN: the standardized language does the communication). (2) They are aimed at a TECHNICAL AUDIENCE (developers, analysts, architects) — their mastery is useful in the software and IS professions. (3) These are DESIGN tools (modeling before building) as well as DOCUMENTATION tools (documenting the existing). (4) For intensive software modeling work, SPECIALIZED tools (dedicated UML tools, basic modeling tools with code/SQL generation) exist and go further (some generate the code or SQL from the diagram, or the opposite — reverse engineering); Visio is good for DRAWING and DOCUMENTING these diagrams in an accessible way, but is not a complete software engineering workshop. Knowing UML diagrams (especially classes and sequence) and database diagrams (entity-relationships) is useful for technical software and IS professions: they are the standard tools for modeling and documenting systems. Visio allows them to be created in an accessible way; knowing how to read and produce them is a skill appreciated in the development, analysis and architecture of information systems.
🔎 Concrete example — Design before building
Model first.
Class diagram: structure of the software before coding.
Entity-relationship diagram: structure of the database before creating it.
→ also document what exists (understand, maintain).
Result: standard tools for modeling and documenting systems.
Reflex: Accessible visio; dedicated tool for intensive engineering.
Section vocabulary
- UML (Unified Modeling Language)
- STANDARDIZED modeling language for designing/documenting object-oriented software systems; several types of diagrams (classes, sequence, use cases, etc.).
Simple example: In “UML Diagrams & Databases”, Nadia applies it as follows: create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) – standardized symbols.
What it is not: It is not a simple decorative element: without this reference, the diagram loses clarity or rigor.
Reflex: UML (Unified Modeling Language) → STANDARDIZED modeling language for designing/documenting object-oriented software systems
- Class/Sequence Diagram
- Classes: the structure (classes, attributes, methods, relationships — inheritance, association), the most used. Sequence: interactions between objects over time (messages).
Simple example: In “UML Diagrams & Databases”, Nadia applies it as follows: create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) – standardized symbols.
What it is not: It is not a simple decorative element: without this reference, the diagram loses clarity or rigor.
Reflex: Class / sequence diagram → classes: the structure (classes, attributes, methods, relationships — inheritance, association), the most used
- Database Schema
- Models the structure of a database: TABLES (entities), FIELDS, KEYS (primary, foreign) and RELATIONS between tables (with cardinality).
Simple example: In “UML Diagrams & Databases”, Nadia applies it as follows: create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) – standardized symbols.
What it is not: It is not a simple decorative element: without this reference, the diagram loses clarity or rigor.
Reflex: Database schema → models the structure of a database: TABLES (entities), FIELDS, KEYS (primary, foreign) and RELATIONS between tables (with cardinality)
- Entity-relationship (ER) model
- Classic representation of a base: entities (tables) linked by relationships; to design, document, understand a base.
Simple example: In “UML Diagrams & Databases”, Nadia applies it as follows: create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) – standardized symbols.
What it is not: It is not a simple decorative element: without this reference, the diagram loses clarity or rigor.
Reflex: Entity-relationship model (ER) → classic representation of a base: entities (tables) linked by relationships
- Standardized notations & dedicated tools
- UML and ER notations are standardized (to be respected for understanding). For intensive work, specialized tools (code/SQL generation) go further than Visio.
Simple example: In “UML Diagrams & Databases”, Nadia applies it as follows: create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) – standardized symbols.
What it is not: It is not a simple decorative element: without this reference, the diagram loses clarity or rigor.
Reflex: Standardized notations & dedicated tools → uML and ER notations are standardized (to be respected for understanding)
In practice — Create UML and database diagrams
- Create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) — standardized symbols.
- Discover the sequence diagram (interactions between objects over time, sequence of messages).
- Create a database schema (entity-relationships): tables (entities) with their fields and keys, linked by relationships with their cardinality.
- Respect the standardized NOTATIONS (UML, ER) for understanding; for intensive work, note that specialized tools (code/SQL generation) go further.
Script to say — UML diagrams & databases
1) Create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) — standardized symbols. 2) Discover the sequence diagram (interactions between objects over time, sequence of messages). 3) Create a database schema (entity-relationships): tables (entities) with their fields and keys, linked by relationships with their cardinality. 4) Respect the standardized NOTATIONS (UML, ER) for understanding; for intensive work, note that specialized tools (code/SQL generation) go further. Then I check: You create UML diagrams (classes, sequence) and database schemas (entity-relations) with standardized notations — the standard tools for modeling and documenting software systems and IS
Adapt the names, forms and distribution format to your context.
Copy and paste model — Card 3.4
Card 3.4 — UML diagrams & databases
Objective: create UML diagrams (classes, sequence) and database schemas (entity-relations) with standardized notations
1. Create a UML class diagram (UML model): classes with their attributes and methods, linked by relationships (inheritance, association) — standardized symbols.
2. Discover the sequence diagram (interactions between objects over time, sequence of messages).
3. Create a database schema (entity-relationships): tables (entities) with their fields and keys, linked by relationships with their cardinality.
4. Respect the standardized NOTATIONS (UML, ER) for understanding; for intensive work, note that specialized tools (code/SQL generation) go further.
Expected result: You create UML diagrams (classes, sequence) and database schemas (entity-relationships) with standardized notations — the standard tools for modeling and documenting software systems and IS
SME / low budget
Minimum version: visio creates diagrams in the SOFTWARE/IS domain: UML (modeling of object-oriented systems) and DATABASE diagrams — to model and document systems (developers, analysts, architects). We limit ourselves to a model, a diagram and a PDF export.
Algerian SME
Local context: uML: CLASSES diagram (structure: classes, attributes, methods, relationships — the most used), SEQUENCE (interactions over time), use cases, activity, etc. We adapt the labels, examples and distribution formats to the team.
Remote work
Remote: DATABASE schemas: ENTITIES-RELATIONSHIPS model (tables/entities, fields, primary/foreign keys, relationships with cardinality) — to design, document, understand a database. We favor cloud storage, sharing by link and comments.
Multidisciplinary team
For a mixed audience: RESPECT standardized notations (UML, ER) for understanding. These are DESIGN and DOCUMENTATION tools. For intensive work, specialized tools (code/SQL generation) go further than Visio. We explain the symbols and keep the wording short.
✓ Best practices
- Respect standardized notations (UML, ER) for understanding.
- Use these diagrams to design AND document.
- For intensive work, consider a specialized tool (code/SQL generation).
✗ Common pitfalls
- Use fanciful symbols (misunderstood by technicians).
- Wait for Visio to generate the code (prefer a dedicated tool).
- Neglecting the cardinality of relationships in a basic schema.
Key takeaways
- Visio creates diagrams in the SOFTWARE/IS domain: UML (object-oriented systems modeling) and DATABASE diagrams — to model and document systems (developers, analysts, architects).
- UML: CLASS diagram (structure: classes, attributes, methods, relationships — the most used), SEQUENCE (interactions over time), use cases, activity, etc.
- DATABASE Schemas: ENTITIES-RELATIONSHIPS model (tables/entities, fields, primary/foreign keys, relationships with cardinality) — to design, document, understand a database.
- RESPECT standardized notations (UML, ER) for understanding. These are DESIGN and DOCUMENTATION tools. For intensive work, specialized tools (code/SQL generation) go further than Visio.
48h challenge — apply tomorrow
Within 48 hours, take a real diagram and apply “UML Diagrams & Databases”: You create UML diagrams (classes, sequence) and database diagrams (entity-relations) with standardized notations — the standard tools for modeling and documenting software systems and IS Deliver the .vsdx and a PDF export, with a sentence about what has changed.
- I know how to explain: Visio creates diagrams in the SOFTWARE/IS domain: UML (modeling of object-oriented systems) and DATABASE diagrams — to model and document systems (developers, analysts, architects).
- UML: CLASS diagram (structure: classes, attributes, methods, relationships — the most used), SEQUENCE (interactions over time), use cases, activity, etc.
- DATABASE Schemas: ENTITIES-RELATIONSHIPS model (tables/entities, fields, primary/foreign keys, relationships with cardinality) — to design, document, understand a database.
Frequently asked questions
Who are UML and database diagrams for, and is Visio enough or do you need a specialized tool?
UML and database diagrams are tools in the TECHNICAL domain (software and information systems); knowing who they serve and whether Visio is enough helps you situate these skills. Who are these diagrams for: (1) DEVELOPERs: to design and document the structure of software (UML class diagrams: which classes, which relationships), understand interactions (sequence diagrams), document a database (table diagram and relationships). (2) System ANALYST and DESIGNER: to model systems, processes, data — translate needs into technical models. (3) Software/IS ARCHITECTS: to design the architecture of a system, document designs. (4) DATABASE administrators and designers: to design the structure of a database (tables, relationships, keys) before creating it, documenting it. (5) More broadly, all those who work on COMPUTER SYSTEMS and need to MODEL (design) or DOCUMENT (represent the existing) them. These diagrams are therefore useful in TECHNICAL software and IS professions — less so for non-technical functions. What they are for (the uses): (1) DESIGN: model a system BEFORE building it (think about the class structure, the database, the interactions — on paper/on screen, before coding). Modeling helps to design well. (2) DOCUMENT: represent an EXISTING system (its structure, its data) to understand it, transmit it, maintain it. (3) COMMUNICATE: sharing a design or understanding of a system within a technical team (a common visual language). (4) ANALYZE: understand a complex system by visualizing it. Why respect standardized NOTATIONS: like the flowchart or the BPMN, the UML and database notations (entity-relations) are STANDARDIZED and international. Respecting them is essential for the diagrams to be UNDERSTOOD by professionals (a correct UML class diagram is read in the same way by any developer; a fanciful notation sows confusion). Standardized language does communication. Is Visio enough or do you need a specialized tool? (1) Visio IS WELL SUITABLE for DRAWING and DOCUMENTING these diagrams in an ACCESSIBLE way. It provides UML and database models and templates with standardized symbols. To create a class diagram, a basic diagram, document a system — Visio does the job, with the advantage of being a tool that many are familiar with (familiar interface, Office integration). For OCCASIONAL to MODERATE use (drawing/documenting UML or basic diagrams), Visio is sufficient. (2) For INTENSIVE software modeling work, SPECIALIZED TOOLS go further. There are tools dedicated to UML (modeling workshops) and to the design of databases which offer functionalities that Visio has little or no access to: (a) CODE GENERATION from the diagram (generate the code skeleton from a class diagram) or the reverse (REVERSE ENGINEERING : generate the diagram from existing code); (b) GENERATION OF SQL from a base schema (create the base from the schema) or the reverse (generate the schema from an existing base); (c) advanced validation, model-code synchronization, software engineering features. (3) These capabilities (generation, synchronization) make specialized tools real “software engineering workshops”, beyond simple drawing. For INTENSIVE modeling work INTEGRATED with development (where the model generates the code/base or stays in sync), a specialized tool is preferable. How to decide: (1) To DRAW/DOCUMENT UML or basic diagrams in an accessible, occasional to moderate way → VISIO is sufficient (familiar, standardized symbols, Office integration). (2) For INTENSIVE modeling work with code/SQL GENERATION, reverse engineering, model-code synchronization → SPECIALIZED TOOL (UML workshop, base design tool). (3) Consider your context: one-off documentation/communication → Visio; intensive software engineering → dedicated tool. In summary: UML diagrams (classes, sequence, etc.) and database diagrams (entity-relations) are used by TECHNICAL software and IS professions (developers, analysts, architects, database designers) to DESIGN, DOCUMENT, COMMUNICATE and ANALYZE computer systems, respecting standardized notations (for understanding). Visio IS WELL SUITABLE for DRAWING and DOCUMENTING these diagrams in an accessible way (standardized symbols, familiar tool) — sufficient for occasional to moderate use. For INTENSIVE software modeling work (code/SQL generation, reverse engineering, model-code synchronization), SPECIALIZED TOOLS go further (software engineering workshops). Choose according to intensity: accessible documentation/communication → Visio; integrated software engineering → dedicated tool. Knowing these diagrams and knowing how to read/produce them is a skill appreciated in technical professions; Visio offers an accessible entry point, within its limits (drawing/documentation, not code generation).
Which UML diagram models the structure (classes, attributes, relationships)?