-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphysical.erd
41 lines (31 loc) · 1021 Bytes
/
physical.erd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
entity Person
id id type autoincrement
attribute name type text
attribute alive type boolean
relation Father
one optional Person // For now, this order is important, the one with 'one' should be the first for unary relations
multiple optional Person
relation Mother
one optional Person
multiple optional Person
relation Friends(Is friends with)
multiple optional Person
multiple optional Person
entity Car
id id type uuid
attribute brand type enum(volvo, BMW, ferrari, volkswagen)
attribute color type varchar(20)
attribute price type float
attribute dec_price type decimal(10, 2)
attribute image type blob
relation Ownership(Is owner)
multiple optional Person
multiple optional Car
attribute since type datetime
table person from entity Person
foreign key father for Father
foreign key mother for Mother
table car from entity Car
table ownership from relation Ownership
table friendship from relation Friends
// integer, float, boolean, varchar(len), date, time, datetime