ER diagrams (entity-relationship) are usually the first step in database design. PlantUML’s ER syntax is weaker than Mermaid’s, but it works and stays in the same family as your other UML diagrams...
ER 图 / 数据模型图通常是数据库设计的第一步。PlantUML 在这块语法比 Mermaid 略弱,但能用,且能跟其他 UML 图保持一致风格。
一句话定义ER 图描绘数据库表(实体)之间的关联关系:1:1 / 1:N / N:M、弱实体、派生属性。它是从领域模型到物理模型过渡的标准图。
123456789101112131415161718192021...
The object diagram is the less-talked-about sibling of the class diagram — but for debugging, doc, and live demos it earns its keep. It’s the class diagram’s “snapshot right now.”
One-line defini...
对象图相对小众,但在调试、文档化状态、举具体例子时极好用——它是类图在某个瞬间的「快照」。
一句话定义对象图描绘特定时刻系统中的一组实例(对象)和它们之间的链接。而类图描述「有哪些类型」,对象图描述「现在这些类型各有什么实例、它们怎么连的」。
123456789101112131415161718192021222324252627282930313233343536@startumlo...
The class diagram is the most-used, most-misused UML diagram. Easy to read in a single example; harder to draw when domain semantics get complex. This walks every relationship type once, end to en...
类图是最常用却最容易被画错的 UML 图。零基础谁都看得懂,复杂了经常因为箭头画错让评审反复确认。这是一篇把类图所有关系一次说清楚的文章。
类成员可见性12345678910111213141516171819202122@startumlclass User { -id: Long -name: String #email: String ~passwordHash:...
Use case diagrams are the most underused UML type. They don’t draw code; they precisely describe what value a system provides and who uses it.
One-line definitionA use case diagram = a set o...
用例图是 UML 里最容易被低估的一张图:它不画代码,但能精确地描述系统对外提供什么价值,谁来用,怎么用。
一句话定义用例图描绘一组参与者 + 一组用例 + 它们之间的关系,加上一个系统边界包住用例。
123456789101112131415161718192021222324@startumlleft to right directionskinparam actorStyle aw...
Class diagrams show “how classes relate.” Component diagrams show “how files / modules assemble.” Deployment diagrams show “how nodes connect at runtime.” Stack the three — that’s the standar...
类图描绘「一个类怎么和别的类互动」,组件图描绘「文件 / 模块怎么组装」,部署图描绘「运行时节点怎么连」。三层一起用是描述完整架构的标准做法。
三层架构图
层级
描绘什么
读者
PlantUML 关键字
类图
类之间的字段、方法、继承关系
开发
class / abstract / interface
组件图
文件 / 模块 ...