mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-10 02:49:40 +02:00
doc(er): add documentation on UK constraint
This commit is contained in:
@@ -234,14 +234,14 @@ The `type` and `name` values must begin with an alphabetic character and may con
|
|||||||
|
|
||||||
#### Attribute Keys and Comments
|
#### Attribute Keys and Comments
|
||||||
|
|
||||||
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 double quotes at the end of an attribute. Comments themselves cannot have double-quote characters in them.
|
Attributes may also have a `key` or comment defined. Keys can be "PK", "FK" or "UK", for Primary Key, Foreign Key or Unique Key. And a `comment` is defined by double quotes at the end of an attribute. Comments themselves cannot have double-quote characters in them.
|
||||||
|
|
||||||
```mermaid-example
|
```mermaid-example
|
||||||
erDiagram
|
erDiagram
|
||||||
CAR ||--o{ NAMED-DRIVER : allows
|
CAR ||--o{ NAMED-DRIVER : allows
|
||||||
CAR {
|
CAR {
|
||||||
string allowedDriver FK "The license of the allowed driver"
|
string allowedDriver FK "The license of the allowed driver"
|
||||||
string registrationNumber
|
string registrationNumber UK
|
||||||
string make
|
string make
|
||||||
string model
|
string model
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ erDiagram
|
|||||||
CAR ||--o{ NAMED-DRIVER : allows
|
CAR ||--o{ NAMED-DRIVER : allows
|
||||||
CAR {
|
CAR {
|
||||||
string allowedDriver FK "The license of the allowed driver"
|
string allowedDriver FK "The license of the allowed driver"
|
||||||
string registrationNumber
|
string registrationNumber UK
|
||||||
string make
|
string make
|
||||||
string model
|
string model
|
||||||
}
|
}
|
||||||
|
@@ -164,14 +164,14 @@ The `type` and `name` values must begin with an alphabetic character and may con
|
|||||||
|
|
||||||
#### Attribute Keys and Comments
|
#### Attribute Keys and Comments
|
||||||
|
|
||||||
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 double quotes at the end of an attribute. Comments themselves cannot have double-quote characters in them.
|
Attributes may also have a `key` or comment defined. Keys can be "PK", "FK" or "UK", for Primary Key, Foreign Key or Unique Key. And a `comment` is defined by double quotes at the end of an attribute. Comments themselves cannot have double-quote characters in them.
|
||||||
|
|
||||||
```mermaid-example
|
```mermaid-example
|
||||||
erDiagram
|
erDiagram
|
||||||
CAR ||--o{ NAMED-DRIVER : allows
|
CAR ||--o{ NAMED-DRIVER : allows
|
||||||
CAR {
|
CAR {
|
||||||
string allowedDriver FK "The license of the allowed driver"
|
string allowedDriver FK "The license of the allowed driver"
|
||||||
string registrationNumber
|
string registrationNumber UK
|
||||||
string make
|
string make
|
||||||
string model
|
string model
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user