1
|
-- phpMyAdmin SQL Dump
|
2
|
-- version 2.11.3deb1ubuntu1.3
|
3
|
-- http://www.phpmyadmin.net
|
4
|
--
|
5
|
-- Host: localhost
|
6
|
-- Generation Time: Oct 21, 2011 at 04:24 PM
|
7
|
-- Server version: 5.0.51
|
8
|
-- PHP Version: 5.2.4-2ubuntu5.18
|
9
|
|
10
|
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
11
|
|
12
|
--
|
13
|
-- Database: `bien_web`
|
14
|
--
|
15
|
|
16
|
-- --------------------------------------------------------
|
17
|
|
18
|
--
|
19
|
-- Table structure for table `bien_results`
|
20
|
--
|
21
|
|
22
|
CREATE TABLE IF NOT EXISTS `bien_results` (
|
23
|
`resultID` int(11) unsigned NOT NULL auto_increment,
|
24
|
`queryName` varchar(150) NOT NULL COMMENT 'unique descriptive name for query',
|
25
|
`queryHeader` varchar(25) NOT NULL COMMENT 'Short column header, not unique',
|
26
|
`queryDescription` varchar(255) default NULL,
|
27
|
`queryDate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
28
|
`querySql` varchar(500) default NULL,
|
29
|
`queryResult` varchar(50) NOT NULL,
|
30
|
PRIMARY KEY (`resultID`),
|
31
|
UNIQUE KEY `queryName` (`queryName`)
|
32
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
33
|
|
34
|
-- --------------------------------------------------------
|
35
|
|
36
|
--
|
37
|
-- Table structure for table `web_datasource`
|
38
|
--
|
39
|
|
40
|
CREATE TABLE IF NOT EXISTS `web_datasource` (
|
41
|
`dataSourceID` int(11) unsigned NOT NULL auto_increment,
|
42
|
`dataSourceName` varchar(100) default NULL,
|
43
|
`aggregatorOrPrimary` varchar(25) default NULL,
|
44
|
`sourceType` varchar(25) default NULL,
|
45
|
`accessLevel` varchar(50) default NULL,
|
46
|
`authorshipContactEmail` varchar(150) default NULL,
|
47
|
PRIMARY KEY (`dataSourceID`),
|
48
|
UNIQUE KEY `dataSourceName` (`dataSourceName`),
|
49
|
KEY `aggregatorOrPrimary` (`aggregatorOrPrimary`),
|
50
|
KEY `sourceType` (`sourceType`),
|
51
|
KEY `accessLevel` (`accessLevel`)
|
52
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
53
|
|
54
|
-- --------------------------------------------------------
|
55
|
|
56
|
--
|
57
|
-- Table structure for table `web_datasource_party`
|
58
|
--
|
59
|
|
60
|
CREATE TABLE IF NOT EXISTS `web_datasource_party` (
|
61
|
`dataSourceID` int(11) unsigned NOT NULL auto_increment,
|
62
|
`partyID` int(11) unsigned default NULL,
|
63
|
`userRole` varchar(50) default NULL,
|
64
|
`isPI` int(1) default NULL,
|
65
|
PRIMARY KEY (`dataSourceID`),
|
66
|
UNIQUE KEY `user_datasource` (`partyID`,`dataSourceID`),
|
67
|
KEY `userRole` (`userRole`),
|
68
|
KEY `isPI` (`isPI`)
|
69
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
70
|
|
71
|
-- --------------------------------------------------------
|
72
|
|
73
|
--
|
74
|
-- Table structure for table `web_file`
|
75
|
--
|
76
|
|
77
|
CREATE TABLE IF NOT EXISTS `web_file` (
|
78
|
`fileID` int(11) unsigned NOT NULL auto_increment,
|
79
|
`fileName` varchar(255) default NULL,
|
80
|
`filePath` varchar(255) default NULL,
|
81
|
`isUrl` int(1) NOT NULL default '0',
|
82
|
`fileType` varchar(25) NOT NULL,
|
83
|
`objectType` varchar(25) default NULL,
|
84
|
PRIMARY KEY (`fileID`),
|
85
|
KEY `fileName` (`fileName`),
|
86
|
KEY `filePath` (`filePath`),
|
87
|
KEY `fileType` (`fileType`),
|
88
|
KEY `objectType` (`objectType`)
|
89
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
90
|
|
91
|
-- --------------------------------------------------------
|
92
|
|
93
|
--
|
94
|
-- Table structure for table `web_observation`
|
95
|
--
|
96
|
|
97
|
CREATE TABLE IF NOT EXISTS `web_observation` (
|
98
|
`observationID` int(11) unsigned NOT NULL auto_increment,
|
99
|
`dataSourceID` int(11) unsigned default NULL,
|
100
|
`dataSourceName` varchar(100) default NULL,
|
101
|
`dataSourceNamePrimary` varchar(100) default NULL,
|
102
|
`plotID` int(11) unsigned default NULL,
|
103
|
`observationType` varchar(10) default NULL,
|
104
|
`bien2_taxonomyID` int(11) unsigned default NULL,
|
105
|
`bien2_DBPlotID` int(11) unsigned default NULL,
|
106
|
`bien2_ObservationID` int(11) unsigned default NULL,
|
107
|
`bien2_OccurID` int(11) unsigned default NULL,
|
108
|
`taxonAuthorityVerbatim` varchar(255) default NULL,
|
109
|
`family` varchar(100) default NULL,
|
110
|
`genus` varchar(100) default NULL,
|
111
|
`species` varchar(150) default NULL,
|
112
|
`taxon` varchar(200) default NULL,
|
113
|
`taxonAuthor` varchar(255) default NULL,
|
114
|
`taxonMorphospecies` varchar(255) default NULL,
|
115
|
`rank` varchar(50) default NULL,
|
116
|
`acceptance` varchar(2) default NULL,
|
117
|
`country` varchar(50) default NULL,
|
118
|
`stateProvince` varchar(100) default NULL,
|
119
|
`countyParish` varchar(100) default NULL,
|
120
|
`countryError` double default NULL,
|
121
|
`stateProvinceError` double default NULL,
|
122
|
`localityDescription` varchar(500) default NULL,
|
123
|
`collector` varchar(150) default NULL,
|
124
|
`collectionNumber` varchar(50) default NULL,
|
125
|
`identifiedBy` varchar(150) default NULL,
|
126
|
`observationDate` date default NULL,
|
127
|
`plotCode` varchar(100) default NULL,
|
128
|
`plotAreaHa` double default NULL,
|
129
|
`plotMinDbh` decimal(5,1) default NULL,
|
130
|
`plotMethod` varchar(100) default NULL,
|
131
|
`latitude` decimal(10,5) default NULL,
|
132
|
`longitude` decimal(10,5) default NULL,
|
133
|
`isValidLatLong` int(1) default NULL,
|
134
|
`isGeovalid` int(1) default NULL,
|
135
|
`isCultivated` int(1) default NULL,
|
136
|
`isCultivatedReason` varchar(255) default NULL,
|
137
|
`abund` int(11) default NULL,
|
138
|
`abund1` int(11) default NULL,
|
139
|
`abund2.5` int(11) default NULL,
|
140
|
`abund10` int(11) default NULL,
|
141
|
`pctCover` decimal(10,5) default NULL,
|
142
|
`bien2_TraitObservationID` int(11) unsigned default NULL,
|
143
|
`traitName` varchar(200) default NULL,
|
144
|
`traitValue` varchar(100) default NULL,
|
145
|
`traitUnit` varchar(100) default NULL,
|
146
|
`traitMethod` varchar(255) default NULL,
|
147
|
`higherPlantGroup` varchar(25) default NULL,
|
148
|
PRIMARY KEY (`observationID`),
|
149
|
KEY `observationID` (`observationID`),
|
150
|
KEY `dataSourceID` (`dataSourceID`),
|
151
|
KEY `dataSourceName` (`dataSourceName`),
|
152
|
KEY `dataSourceNamePrimary` (`dataSourceNamePrimary`),
|
153
|
KEY `plotID` (`plotID`),
|
154
|
KEY `observationType` (`observationType`),
|
155
|
KEY `bien2_taxonomyID` (`bien2_taxonomyID`),
|
156
|
KEY `bien2_DBPlotID` (`bien2_DBPlotID`),
|
157
|
KEY `bien2_ObservationID` (`bien2_ObservationID`),
|
158
|
KEY `bien2_OccurID` (`bien2_OccurID`),
|
159
|
KEY `taxonAuthorityVerbatim` (`taxonAuthorityVerbatim`),
|
160
|
KEY `family` (`family`),
|
161
|
KEY `genus` (`genus`),
|
162
|
KEY `species` (`species`),
|
163
|
KEY `taxon` (`taxon`),
|
164
|
KEY `taxonAuthor` (`taxonAuthor`),
|
165
|
KEY `taxonMorphospecies` (`taxonMorphospecies`),
|
166
|
KEY `rank` (`rank`),
|
167
|
KEY `acceptance` (`acceptance`),
|
168
|
KEY `country` (`country`),
|
169
|
KEY `stateProvince` (`stateProvince`),
|
170
|
KEY `collector` (`collector`),
|
171
|
KEY `identifiedBy` (`identifiedBy`),
|
172
|
KEY `plotCode` (`plotCode`),
|
173
|
KEY `plotAreaHa` (`plotAreaHa`),
|
174
|
KEY `plotMinDbh` (`plotMinDbh`),
|
175
|
KEY `plotMethod` (`plotMethod`),
|
176
|
KEY `isValidLatLong` (`isValidLatLong`),
|
177
|
KEY `isGeovalid` (`isGeovalid`),
|
178
|
KEY `isCultivated` (`isCultivated`),
|
179
|
KEY `isCultivatedReason` (`isCultivatedReason`),
|
180
|
KEY `bien2_TraitObservationID` (`bien2_TraitObservationID`),
|
181
|
KEY `traitName` (`traitName`),
|
182
|
KEY `traitMethod` (`traitMethod`),
|
183
|
KEY `traitUnit` (`traitUnit`),
|
184
|
KEY `higherPlantGroup` (`higherPlantGroup`)
|
185
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
186
|
|
187
|
-- --------------------------------------------------------
|
188
|
|
189
|
--
|
190
|
-- Table structure for table `web_observation_file`
|
191
|
--
|
192
|
|
193
|
CREATE TABLE IF NOT EXISTS `web_observation_file` (
|
194
|
`observationID` int(11) unsigned NOT NULL,
|
195
|
`fileID` int(11) unsigned NOT NULL,
|
196
|
UNIQUE KEY `observation_file` (`fileID`,`observationID`)
|
197
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
198
|
|
199
|
-- --------------------------------------------------------
|
200
|
|
201
|
--
|
202
|
-- Table structure for table `web_party`
|
203
|
--
|
204
|
|
205
|
CREATE TABLE IF NOT EXISTS `web_party` (
|
206
|
`partyID` int(11) unsigned NOT NULL auto_increment,
|
207
|
`partyType` varchar(20) default 'person',
|
208
|
`userName` varchar(50) default NULL,
|
209
|
`lastName` varchar(50) default NULL,
|
210
|
`firstName` varchar(50) default NULL,
|
211
|
`fullName` varchar(100) default NULL,
|
212
|
`email` varchar(150) default NULL,
|
213
|
`primaryInstitution` varchar(255) default NULL,
|
214
|
PRIMARY KEY (`partyID`),
|
215
|
KEY `lastName` (`lastName`),
|
216
|
KEY `firstName` (`firstName`),
|
217
|
KEY `fullName` (`fullName`)
|
218
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
219
|
|
220
|
-- --------------------------------------------------------
|
221
|
|
222
|
--
|
223
|
-- Table structure for table `web_taxon`
|
224
|
--
|
225
|
|
226
|
CREATE TABLE IF NOT EXISTS `web_taxon` (
|
227
|
`taxonID` int(10) unsigned NOT NULL auto_increment,
|
228
|
`parentTaxonID` int(10) unsigned default NULL,
|
229
|
`taxon` varchar(255) NOT NULL,
|
230
|
`rank` varchar(255) default NULL,
|
231
|
`nameClass` varchar(50) default NULL,
|
232
|
`taxonAuthor` varchar(255) default NULL,
|
233
|
`family` varchar(150) default NULL,
|
234
|
`genus` varchar(100) default NULL,
|
235
|
`species` varchar(100) default NULL,
|
236
|
`leftIndex` int(11) default NULL,
|
237
|
`rightIndex` int(11) default NULL,
|
238
|
`isAccepted` int(1) default NULL,
|
239
|
`isHybrid` int(10) unsigned NOT NULL default '0',
|
240
|
PRIMARY KEY (`taxonID`),
|
241
|
UNIQUE KEY `leftIndex` (`leftIndex`),
|
242
|
UNIQUE KEY `rightIndex` (`rightIndex`),
|
243
|
KEY `taxon` (`taxon`),
|
244
|
KEY `taxonAuthor` (`taxonAuthor`),
|
245
|
KEY `rank` (`rank`),
|
246
|
KEY `nameClass` (`nameClass`),
|
247
|
KEY `family` (`family`),
|
248
|
KEY `genus` (`genus`),
|
249
|
KEY `species` (`species`),
|
250
|
KEY `isHybrid` (`isHybrid`),
|
251
|
KEY `parentTaxonID` (`parentTaxonID`)
|
252
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
253
|
|
254
|
-- --------------------------------------------------------
|
255
|
|
256
|
--
|
257
|
-- Table structure for table `web_taxon_file`
|
258
|
--
|
259
|
|
260
|
CREATE TABLE IF NOT EXISTS `web_taxon_file` (
|
261
|
`taxonID` int(11) unsigned NOT NULL,
|
262
|
`fileID` int(11) unsigned NOT NULL,
|
263
|
UNIQUE KEY `taxon_file` (`taxonID`,`fileID`)
|
264
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|