-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema2.sql
73 lines (59 loc) · 967 Bytes
/
schema2.sql
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
CREATE TABLE User (
...
)
CREATE TABLE Group (
...
)
CREATE TABLE Author (
)
CREATE TABLE Translator (
)
CREATE TABLE Book (
id
name
)
CREATE TABLE Translation (
id
name
)
CREATE TABLE Comment (
id
name
// author
file // path to local comment file
)
CREATE TABLE BooksTranslation (
idb
idt
)
CREATE TABLE BooksComment (
idb
idc
)
CREATE TABLE Data (
id
type (dict, decomp, big5)
name string
descr string/blob
fmt string/enum
fmtparams blob/string (JSON)
file // path to local, compressed file
url_info
url_fetch
)
CREATE TABLE URL (
id
value
type (info, fetch)
)
CREATE TABLE License (
id
name
comment
url/urlid
)
-- getbook() : retrieve a hash with all book informations, joining tables
-- where needed, optional translations/comments.
-> how do we handle comments edition? public/private comments?
-> do we allow multiple comments files/translations at once with
user-specified rotation + bookmark of current value?