Mark obligatory (non-null) table fields in ERD? #3718
Replies: 4 comments 2 replies
-
I investigated this further and it seems it is not even possible to have a column name such as |
Beta Was this translation helpful? Give feedback.
-
I would like to have this as well ? |
Beta Was this translation helpful? Give feedback.
-
There is also an issue regarding this topic: #4429 |
Beta Was this translation helpful? Give feedback.
-
I, too, find it a quite useful feature. And relatively easy to implement as it's basically "PK"/"FK" with a different label. It also doesn't bring any real background logic dependencies, because it's all contained within an isolated field/column. Until somebody decides to turn Mermaid-ERD into a full-scale DB schema generation software, that is… Update: I didn't realize OsirisDBA's comment was about Mermaid-ERD comments like in the diagram below.
erDiagram
User {
UUID4 id PK
str email UK "NN"
text phone UK "or you might decide not to use NN for UK"
datetime created_at "NN"
datetime last_modified "NN"
}
(I don't think you need mark PK as NN. It's kind of implied. Not so sure about UK, though, but I'd personally imply that as well.) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
is there a specific way to visually mark the table fields in an ER diagram which can't be NULL, i.e. the ones that are obligatory? Sometimes you see them marked with an asterisk (I could add it behind the field name) or they are shown in a bold font (is that possible?). Other times this information is displayed in a separate column. The 'KEY' attribute can only hold PK or FK and this is also a place where this information could be should if Mermaid allowed other text than these two key types.
Any help or insight on this?
Beta Was this translation helpful? Give feedback.
All reactions