mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 08:50:13 +02:00
Update entityRelationshipDiagram.md
Just a piece of code that was there but didn't appear as code but just as the resulting graph.
This commit is contained in:
@@ -195,6 +195,24 @@ The `type` and `name` values must begin with an alphabetic character and may con
|
|||||||
|
|
||||||
Attributes may also have a `key` or comment defined. Keys can be "PK" or "FK", for Primary Key or Foreign Key. And a `comment` is defined by quotes at the end of an attribute. Comments themselves cannot have quote characters in them.
|
Attributes may also have a `key` or comment defined. Keys can be "PK" or "FK", for Primary Key or Foreign Key. And a `comment` is defined by quotes at the end of an attribute. Comments themselves cannot have quote characters in them.
|
||||||
|
|
||||||
|
```
|
||||||
|
erDiagram
|
||||||
|
CAR ||--o{ NAMED-DRIVER : allows
|
||||||
|
CAR {
|
||||||
|
string allowedDriver FK 'The license of the allowed driver'
|
||||||
|
string registrationNumber
|
||||||
|
string make
|
||||||
|
string model
|
||||||
|
}
|
||||||
|
PERSON ||--o{ NAMED-DRIVER : is
|
||||||
|
PERSON {
|
||||||
|
string driversLicense PK 'The license #'
|
||||||
|
string firstName
|
||||||
|
string lastName
|
||||||
|
int age
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
erDiagram
|
erDiagram
|
||||||
CAR ||--o{ NAMED-DRIVER : allows
|
CAR ||--o{ NAMED-DRIVER : allows
|
||||||
|
Reference in New Issue
Block a user