差異處
這裏顯示兩個版本的差異處。
| Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
|
open:ermodel [2022/08/04 17:42] wenchin [0] |
open:ermodel [2022/08/04 19:08] (目前版本) wenchin |
||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ==== 0 ==== | ||
| <uml> | <uml> | ||
| @startuml | @startuml | ||
| - | + | hide circle | |
| - | ' hide the spot | + | left to right direction |
| - | 'hide circle | + | |
| - | + | ||
| - | ' avoid problems with angled crows feet | + | |
| - | 'skinparam linetype ortho | + | |
| entity "Customer" as e01 { | entity "Customer" as e01 { | ||
| 行 46: | 行 40: | ||
| e01::cust_code ||..o{ e02::cust_code | e01::cust_code ||..o{ e02::cust_code | ||
| - | e02 ||.r..o{ e03 | + | e02::tran_code ||..o{ e03::tran_code |
| - | e03 |o...o{ e04 | + | e03::e1_id |o..o{ e04::prod_cdoe |
| @enduml | @enduml | ||
| </uml> | </uml> | ||
| - | |||
| - | \\ | ||
| - | ==== 1 ==== | ||
| - | <uml> | ||
| - | @startuml | ||
| - | |||
| - | ' hide the spot | ||
| - | hide circle | ||
| - | |||
| - | ' avoid problems with angled crows feet | ||
| - | skinparam linetype ortho | ||
| - | |||
| - | |||
| - | entity "Customer" as e01 { | ||
| - | *account <<PK>> | ||
| - | -- | ||
| - | *cust_code <<PK>> | ||
| - | cust_name | ||
| - | cust_addr | ||
| - | other_details | ||
| - | } | ||
| - | |||
| - | entity "Tran" as e02 { | ||
| - | *tran_code <<PK>> | ||
| - | *cust_code <<FK>> | ||
| - | -- | ||
| - | *tran_code <<PK>> | ||
| - | tran_date | ||
| - | tran_total | ||
| - | tran_delivery | ||
| - | } | ||
| - | |||
| - | entity "Cart" as e03 { | ||
| - | *cart_code <<generated>> | ||
| - | -- | ||
| - | *tran_code <<FK>> | ||
| - | -- | ||
| - | e1_id : number <<FK>> | ||
| - | other_details : text | ||
| - | } | ||
| - | |||
| - | entity "Product" as e04 { | ||
| - | *prod_cdoe <<PK>> | ||
| - | -- | ||
| - | prod_name | ||
| - | description | ||
| - | } | ||
| - | |||
| - | e01 ||.r..o{ e02 | ||
| - | e02 ||.r..o{ e03 | ||
| - | e03 |o...o{ e04 | ||
| - | |||
| - | @enduml | ||
| - | </uml> | ||
| - | |||
| - | |||
| - | \\ | ||
| - | ==== 2 ==== | ||
| - | <uml> | ||
| - | @startuml | ||
| - | |||
| - | ' hide the spot | ||
| - | ' hide circle | ||
| - | |||
| - | ' avoid problems with angled crows feet | ||
| - | ' skinparam linetype ortho | ||
| - | |||
| - | left to right direction | ||
| - | |||
| - | entity "Customer" as e01 { | ||
| - | *account <<PK>> | ||
| - | -- | ||
| - | cust_code | ||
| - | cust_name | ||
| - | cust_addr | ||
| - | other_details | ||
| - | } | ||
| - | |||
| - | entity "Tran" as e02 { | ||
| - | tran_code | ||
| - | cust_code | ||
| - | -- | ||
| - | tran_date | ||
| - | tran_total | ||
| - | tran_delivery | ||
| - | } | ||
| - | |||
| - | e01::cust_code ||...o{ e02::cust_code | ||
| - | |||
| - | @enduml | ||
| - | </uml> | ||
| - | |||
| - | |||
| - | ==== 3 ==== | ||
| - | <uml> | ||
| - | @startuml | ||
| - | left to right direction | ||
| - | |||
| - | class User { | ||
| - | id : INTEGER | ||
| - | .. | ||
| - | other_id : INTEGER | ||
| - | } | ||
| - | |||
| - | class Email { | ||
| - | id : INTEGER | ||
| - | .. | ||
| - | user_id : INTEGER | ||
| - | address : INTEGER | ||
| - | } | ||
| - | |||
| - | User::id *-- Email::user_id | ||
| - | @enduml | ||
| - | </uml> | ||
| - | |||
| - | |||
| - | \\ | ||
| - | ==== 4 ==== | ||
| - | <uml> | ||
| - | @startuml | ||
| - | left to right direction | ||
| - | |||
| - | entity User { | ||
| - | id : INTEGER | ||
| - | .. | ||
| - | other_id : INTEGER | ||
| - | } | ||
| - | |||
| - | entity Email { | ||
| - | id : INTEGER | ||
| - | .. | ||
| - | user_id : INTEGER | ||
| - | address : INTEGER | ||
| - | } | ||
| - | |||
| - | User::id ||...o{ Email::user_id | ||
| - | @enduml | ||
| - | </uml> | ||