skanaar / nomnoml

The sassy UML diagram renderer
https://www.nomnoml.com
MIT License
2.66k stars 208 forks source link

Add 'doubled' shape style #204

Open kinto-b opened 1 year ago

kinto-b commented 1 year ago

Hi,

Fantastic piece of software! Thanks for your work

I would like to use nomnoml to produce ERDs. However, it is not currently possible to refer to weak entities, identifying relationships, etc. (in the notation below). One way to make these possible would be to add a 'doubled' outline style to complement 'dashed' so that, e.g.,

#. rel_id doubled visual = rhomb 
[E1] - [<rel_id> identifies] - [E2] 

would yield something like

image

It would be ideal if something similar could apply to connections so, e.g.,

#. rel visual = rhomb 
[E1] =N [<rel> owns] 1- [E2] 

would yield something like

image

The notation I have in mind is as follows:

image

skanaar commented 1 year ago

I like it! This should be possible. Some questions related to the more complex shapes like database remain.

Could you share a link to some ERD diagram specification so I can read up on it?

kinto-b commented 1 year ago

Ah great to hear!

There's no single standard for ERD notation that I know of, unfortunately. But this one -- sometimes called the Chen notation -- is fairly common. It is used in many textbooks on database systems. For example, see Elmasri & Navathe, Fundamentals of Database Systems, 7th edition, ch.3 (esp. p.83 where the notation is summarised) and appendix A. (Link: https://amirsmvt.github.io/Database/Static_files/Fundamental_of_Database_Systems.pdf)