← Back to index

er-multiline

Example 1

SebastianJS (SVG)
../assets/er-multiline-1.svg
Mermaid (code)
erDiagram
CAR ||--o{ NAMED-DRIVER : allows
CAR ::: Pine {
    string registrationNumber PK "Primary KeyUnique registration number"
    string make "Car makee.g., Toyota"
    string model "Model of the care.g., Corolla"
    string[] parts "List of partsStored as array"
}
PERSON ||--o{ NAMED-DRIVER : is
PERSON ::: someclass {
    string driversLicense PK "The license #Primary Key"
    string(99) firstName "Only 99 characters are allowed  e.g., Smith"
    string lastName "Last name of persone.g., Smith"
    string phone UK "Unique phone numberUsed for contact"
    int age "Age of the personMust be numeric"
}
NAMED-DRIVER {
    string carRegistrationNumber PK, FK, UK, PK "Foreign key to CARAlso part of PK"
    string driverLicence PK, FK "Foreign key to PERSONAlso part of PK"
}
MANUFACTURER only one to zero or more CAR : makesx

Example 2

SebastianJS (SVG)
../assets/er-multiline-2.svg
Mermaid (code)
erDiagram
_**testẽζ➕Ø😀㌕ぼ**_ {
  *__List~List~int~~sdfds__* **driversLicense** PK "***The l😀icense #***"
  string last*Name*
  string __phone__ UK
  *string(99)~T~~~~~~* firstName "Only __99__ characters are allowed dsfsdfsdfsdfs"
int _age_
}