Tạo Entity Relationship Diagram bằng PlantUML

Ví dụ minh họa:
@startuml
Entity01 }|..|| Entity02
Entity03 }o..o| Entity04
Entity05 ||--o{ Entity06
Entity07 |o--|| Entity08
@enduml
Hiển thị nhận được sẽ là:

2. Mô tả một Entities
@startuml
entity Entity01 {
* identifying_attribute
--
* mandatory_attribute
optional_attribute
}
@enduml

3. Ví dụ minh họa
@startuml
' hide the spot
hide circle
' avoid problems with angled crows feet
skinparam linetype ortho
entity "Entity01" as e01 {
*e1_id : number <<generated>>
--
*name : text
description : text
}
entity "Entity02" as e02 {
*e2_id : number <<generated>>
--
*e1_id : number <<FK>>
other_details : text
}
entity "Entity03" as e03 {
*e3_id : number <<generated>>
--
e1_id : number <<FK>>
other_details : text
}
e01 ||..o{ e02
e01 |o..o{ e03
@enduml
Hiển thị nhận được có dạng như sau:

Bài viết được tham khảo từ trang: https://plantuml.com/en/ie-diagram
You need to login in order to like this post: click here
YOU MIGHT ALSO LIKE