-
Notifications
You must be signed in to change notification settings - Fork 0
/
lifelog.er
57 lines (42 loc) · 1.46 KB
/
lifelog.er
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
title {label: "Entity-Relationship Diagram For Life Log", size: "240", bgcolor:"#ececfc"}
[CONFIG]
*ID {label: " INT NOT NULL UNIQUE GENERATED BY DEFAULT AS IDENTITY"}
NAME {label: " VARCHAR(16) UNIQUE"}
VALUE {label: " VARCHAR(28)"}
DESCRIPTION {label: " VARCHAR(128)"}
[AUTH]
*ALIAS {label: " VARCHAR (20) PRIMARY KEY"}
PASSW {label: " TEXT"}
EMAIL {label: " VARCHAR (44)"}
ACTION {label: " INT"}
[LOG] {bgcolor: "gold"}
*ID {label: " INT UNIQUE GENERATED ALWAYS AS IDENTITY" }
ID_CAT {label: " INT NOT NULL"}
ID_RTF {label: " INT DEFAULT 0"}
DATE {label: " TIMESTAMP NOT NULL"}
LOG {label: " VARCHAR (128) NOT NULL"}
AMOUNT {label: " INT"}
AFLAG {label: " INT DEFAULT 0"}
STICKY {label: " BOOL DEFAULT FALSE"}
[CAT] {bgcolor: "maroon"}
*ID {label: " INT GENERATED BY DEFAULT AS IDENTITY"}
NAME {label: " VARCHAR (16)"}
DESCRIPTION {label: " VARCHAR (225)"}
[NOTES]{bgcolor: "cyan"}
*LID {label: " INTEGER PRIMARY KEY NOT NULL"}
DOC {label: " TEXT"}
# Each relationship must be between exactly two entities, which need not
# be distinct. Each entity in the relationship has exactly one of four
# possible cardinalities:
#
# Cardinality Syntax
# 0 or 1 0
# exactly 1 1
# 0 or more *
# 1 or more +
LOG *--1 CAT
LOG *--0 NOTES
LIFE_LOG_APPLICATION 1--1 CONFIG
LIFE_LOG_APPLICATION 1--1 AUTH
LIFE_LOG_APPLICATION 1--1 LOG
Alias 1--1 Database