Created
July 31, 2018 01:33
-
-
Save stacyhorton/d847facb08fa63207b5028fe2814e87e to your computer and use it in GitHub Desktop.
Some examples of how to use the as-yet undocumented PlantUML ERD functionality.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
hide circle | |
hide empty members | |
' PlantUML ERD examples worked out from: | |
' https://github.com/plantuml/plantuml/pull/31 | |
together { | |
' zero or one | |
foo1 -o| bar1 | |
' exactly one | |
foo2 --|| bar2 | |
' zero or many | |
foo3 -o{ bar3 | |
' one or many | |
foo4 -|{ bar4 | |
' you can combine any of these at both ends | |
foo5 ||-|{ bar5 | |
} | |
entity User { | |
**id** int [PRI] | |
other_key guid | |
-- | |
**group_id** int [FK] | |
-- | |
**email** [UNIQ] | |
firstname varchar(255) | |
lastname varchar(255) | |
created_at datetime | |
updated_at datetime | |
... | |
} | |
entity Group { | |
**id** int [PRI] | |
-- | |
... | |
} | |
Group -o{ User | |
@enduml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment