Chen's EERD: how to draw an associative entity

0 votes
asked Feb 7 in Question / help by hatty

I'm making an EERD and need to draw an associative entity, how do I do that? Looking at the documentation there is no mention of the associative entity. Also I couldn't find anyone doing that in plantuml. Thanks.

1 Answer

0 votes
answered Mar 9 by dickmaley (4,120 points)

Is this what you are looking for?

image

@startuml
' hide the spot
' hide circle
' avoid problems with angled crows feet
skinparam linetype ortho
entity "User" as e01 {
*user_id : number <<generated>>
--
*name : text
description : text
}
entity "Card" as e02 {
*card_id : number <<generated>>
sync_enabled: boolean
version: number
last_sync_version: number
--
*user_id : number <<FK>>
other_details : text
}
entity "CardHistory" as e05 {
*card_history_id : number <<generated>>
version : number
--
*card_id : number <<FK>>
other_details : text
}
entity "CardsAccounts" as e04 {
*id : number <<generated>>
--
card_id : number <<FK>>
account_id : number <<FK>>
other_details : text
}
entity "Account" as e03 {
*account_id : number <<generated>>
--
user_id : number <<FK>>
other_details : text
}
entity "Stream" as e06 {
*id : number <<generated>>
version: number
searchingText: string
--
owner_id : number <<FK>>
follower_id : number <<FK>>
card_id: number <<FK>>
other_details : text
}
e01 }|..|| e02
e01 }|..|| e03
e02 }|..|| e05
e02 }|..|| e04
e03 }|..|| e04
e02 }|..|| e06
e03 }|..|| e06
@enduml

commented Mar 9 by anonymous
Thank you, but no. This is not what I was looking for. I was looking for a way to add an associative entity in chen's notation. It looks like a rectangle with a rhombus shape inside of it.
...