-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
89 lines (86 loc) · 1.92 KB
/
schema.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
DROP TABLE IF EXISTS nameusage;
CREATE TABLE nameusage (
`kingdom` TEXT,
`phylum` TEXT,
`subphylum` TEXT,
`class` TEXT,
`order` TEXT,
`suborder` TEXT,
`infraorder` TEXT,
`parvorder` TEXT,
`superfamily` TEXT,
`family` TEXT,
`subfamily` TEXT,
`tribe` TEXT,
`subtribe` TEXT,
`genus` TEXT,
`subgenus` TEXT,
`species` TEXT,
`subspecies` TEXT,
`infraspecies` TEXT,
`form` TEXT,
`variety` TEXT,
`aberration` TEXT,
`other` TEXT,
`dataset_id` TEXT,
`dataset_alias` TEXT,
`parent_id` TEXT,
`taxon_id` TEXT,
`name_id` TEXT,
`rank` TEXT,
`accepted_id` TEXT,
`accepted_name` TEXT,
`accepted_author` TEXT,
`scientific_name` TEXT,
`authorship` TEXT,
`authors` TEXT,
`year` TEXT,
`status` TEXT,
`extinct` BOOLEAN,
`temporal_range_start` TEXT,
`temporal_range_end` TEXT,
`link` TEXT,
`reference_id` REFERENCES reference(reference_id),
`identifiers` TEXT,
FOREIGN KEY(`reference_id`) REFERENCES reference(`reference_id`),
FOREIGN KEY(`dataset_id`) REFERENCES dataset(`dataset_id`)
);
DROP TABLE IF EXISTS reference;
CREATE TABLE reference (
`reference_id` TEXT PRIMARY KEY,
`source_id` TEXT,
`type` TEXT,
`authors` TEXT,
`year` TEXT,
`title` TEXT,
`citation` TEXT,
`journal` TEXT,
`volume` TEXT,
`page` TEXT
);
DROP TABLE IF EXISTS dataset;
CREATE TABLE dataset (
`dataset_id` TEXT PRIMARY KEY,
`alias` TEXT,
`title` TEXT,
`issued` TEXT,
`version` TEXT,
`description` TEXT,
`contact` TEXT,
`creator` TEXT,
`editor` TEXT,
`publisher` TEXT,
`contributor` TEXT,
`doi` TEXT,
`license` TEXT,
`geographic_scope` TEXT,
`temporal_scope` TEXT,
`taxonomic_scope` TEXT,
`confidence` TEXT,
`completeness` TEXT,
`logo` TEXT,
`created` TEXT,
`modified` TEXT,
`type` TEXT,
`origin` TEXT
);