Basic ErNode
---
config:
htmlLabels: false
look: handDrawn
theme: forest
---
erDiagram
_**hiØ**_[*test*] {
*__List~List~int~~sdfds__* __driversLicense__ PK "***The l😀icense #***"
*string(99)~T~~~~~~* firstName "Only 99
characters are a
llowed dsfsdfsdfsdfs"
string lastName
string phone UK
int age
}
style PERSON color:red, stroke:blue,fill:#f9f
classDef test,test2 stroke:red
class PERSON test,test2
Basic ErNode
---
config:
htmlLabels: true
look: handDrawn
---
erDiagram
c[CUST😀OMER]
p[__PERSON__]
style c,p fill:#f9f,stroke:blue, color:grey, font-size:24px,font-weight:bold
Basic Relationship
---
config:
htmlLabels: false
look:
---
erDiagram
"hi" }o..o{ ORDER : places
Basic Relationship
---
config:
htmlLabels: false
look:
---
erDiagram
CAR ||--|{ NAMED-DRIVER : allows
PERSON ||..o{ NAMED-DRIVER : is
Basic Relationship
---
config:
htmlLabels: true
---
erDiagram
CAR ||--o{ NAMED-DRIVER : allows
CAR {
test test PK "comment"
string make
string model
string[] parts
}
PERSON ||--o{ NAMED-DRIVER : is
PERSON ||--o{ CAR : is
PERSON {
string driversLicense PK "The license #"
string(99) firstName "Only 99 characters are allowed"
string lastName
string phone UK
int age
}
NAMED-DRIVER {
string carRegistrationNumber PK, FK
string driverLicence PK, FK
}
MANUFACTURER only one to zero or more CAR : makes
Basic Relationship
---
title: simple ER diagram
config:
theme: forest
---
erDiagram
direction TB
p[Pers😀on] {
string firstName
string lastName
}
a["Customer Account"] {
string email
}
p ||--o| a : has
Basic Relationship
erDiagram
CUSTOMER ||--o{ CUSTOMER : refers
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains