このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
eclipse:plant-uml [2021/02/11 14:52] y2sunlight [Eclipseからの実行] |
eclipse:plant-uml [2021/02/11 22:16] (現在) y2sunlight [EclipseでER図を作る] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | > 編集中 | + | ====== EclipseでPlantUMLを使いER図を作成する |
- | + | ||
- | ----- | + | |
- | + | ||
- | ====== EclipseでPlantUMLを使う ====== | + | |
Eclipse Version 2019-12 \\ | Eclipse Version 2019-12 \\ | ||
- | PlantUML Plug-in Version | + | PlantUML Plug-in Version |
graphviz Version | graphviz Version | ||
行 37: | 行 33: | ||
* OfficeSuite 拡張機能 --- LibreOffice Writer, Microsoft Word | * OfficeSuite 拡張機能 --- LibreOffice Writer, Microsoft Word | ||
* その他 --- Google Docs(PlantUML Gizmo), LaTeX(PGF/ | * その他 --- Google Docs(PlantUML Gizmo), LaTeX(PGF/ | ||
+ | |||
+ | 本編では、EclipseでPlantUMLを使ってER図を書くことに主眼を置いていますが、勿論、クラス図、シーケンス図などの他のダイアグラムを書くこともできます。 | ||
----- | ----- | ||
行 134: | 行 132: | ||
* 名前 --- '' | * 名前 --- '' | ||
- | * ロケーション --- '' | + | * ロケーション --- '' |
[{{: | [{{: | ||
行 151: | 行 149: | ||
\\ | \\ | ||
- | ===== EclipseでER図を作る ===== | + | ===== EclipseでER図を作成 ===== |
- | 例としてEclipseでER図を作ってみます。 | + | それでは、EclipseでER図を作ってみます。 |
Eclipseで任意のプロジェクトを開き、以下のようなファイルを作ります。 | Eclipseで任意のプロジェクトを開き、以下のようなファイルを作ります。 | ||
- | {{fa> | + | <code - sample1.txt> |
- | <code - er.txt> | + | |
@startuml | @startuml | ||
Entity01 }|..|| Entity02 | Entity01 }|..|| Entity02 | ||
行 174: | 行 171: | ||
以下は、もう少し複雑なER図の例です。 | 以下は、もう少し複雑なER図の例です。 | ||
- | {{fa> | + | <code - sample2.txt> |
- | <code - er.txt> | + | |
@startuml | @startuml | ||
- | Entity01 }|..|| Entity02 | + | |
- | Entity03 }o..o| Entity04 | + | ' hide the spot |
- | Entity05 | + | hide circle |
- | Entity07 | + | |
+ | ' avoid problems with angled crows feet | ||
+ | skinparam linetype ortho | ||
+ | |||
+ | entity "Entity01" as e01 { | ||
+ | *e1_id : number << | ||
+ | -- | ||
+ | *name : text | ||
+ | description : text | ||
+ | } | ||
+ | |||
+ | entity "Entity02" as e02 { | ||
+ | | ||
+ | -- | ||
+ | *e1_id : number << | ||
+ | other_details : text | ||
+ | } | ||
+ | |||
+ | entity "Entity03" as e03 { | ||
+ | *e3_id : number << | ||
+ | -- | ||
+ | e1_id : number << | ||
+ | other_details : text | ||
+ | } | ||
+ | |||
+ | e01 ||..o{ e02 | ||
+ | e01 |o..o{ e03 | ||
@enduml | @enduml | ||
</ | </ | ||
+ | [{{: | ||
+ | |||
+ | PlantUMLによるER図の書き方については、以下を参照して下さい: | ||
+ | * https:// | ||
+ | PlantUMLのER図は、クラス図の派生物的な扱いなので、クラス図に関する書き方がそのまま利用できます。 | ||
- | https:// | + | * https:// |
\\ | \\ | ||