Project

General

Profile

« Previous | Next » 

Revision 12172

schemas/vegbien.sql, validation/aggregating/*/*.sql: renamed public_validation_* to plural public_validations_* since we refer to them as aggregating validation*s*

View differences:

trunk/schemas/vegbien.sql
10 10
SET client_min_messages = warning;
11 11

  
12 12
--
13
-- Name: public_validation_plots; Type: SCHEMA; Schema: -; Owner: -
13
-- Name: public_validations_plots; Type: SCHEMA; Schema: -; Owner: -
14 14
--
15 15

  
16
CREATE SCHEMA public_validation_plots;
16
CREATE SCHEMA public_validations_plots;
17 17

  
18 18

  
19 19
--
20
-- Name: SCHEMA public_validation_plots; Type: COMMENT; Schema: -; Owner: -
20
-- Name: SCHEMA public_validations_plots; Type: COMMENT; Schema: -; Owner: -
21 21
--
22 22

  
23
COMMENT ON SCHEMA public_validation_plots IS 'aggregating validations queries for plots';
23
COMMENT ON SCHEMA public_validations_plots IS 'aggregating validations queries for plots';
24 24

  
25 25

  
26 26
--
27
-- Name: public_validation_specimens; Type: SCHEMA; Schema: -; Owner: -
27
-- Name: public_validations_specimens; Type: SCHEMA; Schema: -; Owner: -
28 28
--
29 29

  
30
CREATE SCHEMA public_validation_specimens;
30
CREATE SCHEMA public_validations_specimens;
31 31

  
32 32

  
33 33
--
34
-- Name: SCHEMA public_validation_specimens; Type: COMMENT; Schema: -; Owner: -
34
-- Name: SCHEMA public_validations_specimens; Type: COMMENT; Schema: -; Owner: -
35 35
--
36 36

  
37
COMMENT ON SCHEMA public_validation_specimens IS 'aggregating validations queries for specimens';
37
COMMENT ON SCHEMA public_validations_specimens IS 'aggregating validations queries for specimens';
38 38

  
39 39

  
40 40
--
41
-- Name: public_validation_traits; Type: SCHEMA; Schema: -; Owner: -
41
-- Name: public_validations_traits; Type: SCHEMA; Schema: -; Owner: -
42 42
--
43 43

  
44
CREATE SCHEMA public_validation_traits;
44
CREATE SCHEMA public_validations_traits;
45 45

  
46 46

  
47 47
--
48
-- Name: SCHEMA public_validation_traits; Type: COMMENT; Schema: -; Owner: -
48
-- Name: SCHEMA public_validations_traits; Type: COMMENT; Schema: -; Owner: -
49 49
--
50 50

  
51
COMMENT ON SCHEMA public_validation_traits IS 'aggregating validations queries for traits';
51
COMMENT ON SCHEMA public_validations_traits IS 'aggregating validations queries for traits';
52 52

  
53 53

  
54 54
SET search_path = public, pg_catalog;
......
5179 5179
ALTER SEQUENCE voucher_voucher_id_seq OWNED BY voucher.voucher_id;
5180 5180

  
5181 5181

  
5182
SET search_path = public_validation_plots, pg_catalog;
5182
SET search_path = public_validations_plots, pg_catalog;
5183 5183

  
5184 5184
--
5185
-- Name: _01_count_of_projects; Type: VIEW; Schema: public_validation_plots; Owner: -
5185
-- Name: _01_count_of_projects; Type: VIEW; Schema: public_validations_plots; Owner: -
5186 5186
--
5187 5187

  
5188 5188
CREATE VIEW _01_count_of_projects AS
......
5193 5193

  
5194 5194

  
5195 5195
--
5196
-- Name: _02_list_of_project_names; Type: VIEW; Schema: public_validation_plots; Owner: -
5196
-- Name: _02_list_of_project_names; Type: VIEW; Schema: public_validations_plots; Owner: -
5197 5197
--
5198 5198

  
5199 5199
CREATE VIEW _02_list_of_project_names AS
......
5204 5204

  
5205 5205

  
5206 5206
--
5207
-- Name: _03_count_of_all_plots_in_this_source; Type: VIEW; Schema: public_validation_plots; Owner: -
5207
-- Name: _03_count_of_all_plots_in_this_source; Type: VIEW; Schema: public_validations_plots; Owner: -
5208 5208
--
5209 5209

  
5210 5210
CREATE VIEW _03_count_of_all_plots_in_this_source AS
......
5217 5217

  
5218 5218

  
5219 5219
--
5220
-- Name: _04_count_of_plots_in_each_project_in_this_source; Type: VIEW; Schema: public_validation_plots; Owner: -
5220
-- Name: _04_count_of_plots_in_each_project_in_this_source; Type: VIEW; Schema: public_validations_plots; Owner: -
5221 5221
--
5222 5222

  
5223 5223
CREATE VIEW _04_count_of_plots_in_each_project_in_this_source AS
......
5232 5232

  
5233 5233

  
5234 5234
--
5235
-- Name: _05_list_of_plot_codes_by_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5235
-- Name: _05_list_of_plot_codes_by_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5236 5236
--
5237 5237

  
5238 5238
CREATE VIEW _05_list_of_plot_codes_by_project AS
......
5246 5246

  
5247 5247

  
5248 5248
--
5249
-- Name: _06_list_of_plots_with_stem_measurements; Type: VIEW; Schema: public_validation_plots; Owner: -
5249
-- Name: _06_list_of_plots_with_stem_measurements; Type: VIEW; Schema: public_validations_plots; Owner: -
5250 5250
--
5251 5251

  
5252 5252
CREATE VIEW _06_list_of_plots_with_stem_measurements AS
......
5265 5265

  
5266 5266

  
5267 5267
--
5268
-- Name: _10_count_of_individuals_per_plot_in_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5268
-- Name: _10_count_of_individuals_per_plot_in_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5269 5269
--
5270 5270

  
5271 5271
CREATE VIEW _10_count_of_individuals_per_plot_in_each_project AS
......
5285 5285

  
5286 5286

  
5287 5287
--
5288
-- Name: VIEW _10_count_of_individuals_per_plot_in_each_project; Type: COMMENT; Schema: public_validation_plots; Owner: -
5288
-- Name: VIEW _10_count_of_individuals_per_plot_in_each_project; Type: COMMENT; Schema: public_validations_plots; Owner: -
5289 5289
--
5290 5290

  
5291 5291
COMMENT ON VIEW _10_count_of_individuals_per_plot_in_each_project IS 'Method: count taxonObservations
......
5295 5295

  
5296 5296

  
5297 5297
--
5298
-- Name: _11_count_of_stems_per_plot_in_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5298
-- Name: _11_count_of_stems_per_plot_in_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5299 5299
--
5300 5300

  
5301 5301
CREATE VIEW _11_count_of_stems_per_plot_in_each_project AS
......
5317 5317

  
5318 5318

  
5319 5319
--
5320
-- Name: VIEW _11_count_of_stems_per_plot_in_each_project; Type: COMMENT; Schema: public_validation_plots; Owner: -
5320
-- Name: VIEW _11_count_of_stems_per_plot_in_each_project; Type: COMMENT; Schema: public_validations_plots; Owner: -
5321 5321
--
5322 5322

  
5323 5323
COMMENT ON VIEW _11_count_of_stems_per_plot_in_each_project IS 'Method: count records in stemobservation table
......
5325 5325

  
5326 5326

  
5327 5327
--
5328
-- Name: _12_count_of_verbatim_taxa_per_plot_in_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5328
-- Name: _12_count_of_verbatim_taxa_per_plot_in_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5329 5329
--
5330 5330

  
5331 5331
CREATE VIEW _12_count_of_verbatim_taxa_per_plot_in_each_project AS
......
5346 5346

  
5347 5347

  
5348 5348
--
5349
-- Name: VIEW _12_count_of_verbatim_taxa_per_plot_in_each_project; Type: COMMENT; Schema: public_validation_plots; Owner: -
5349
-- Name: VIEW _12_count_of_verbatim_taxa_per_plot_in_each_project; Type: COMMENT; Schema: public_validations_plots; Owner: -
5350 5350
--
5351 5351

  
5352 5352
COMMENT ON VIEW _12_count_of_verbatim_taxa_per_plot_in_each_project IS 'Check: join to source db by all columns, returns same number of rows
......
5356 5356

  
5357 5357

  
5358 5358
--
5359
-- Name: _13_list_of_distinct_verbatim_taxa_in_each_plot_in_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5359
-- Name: _13_list_of_distinct_verbatim_taxa_in_each_plot_in_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5360 5360
--
5361 5361

  
5362 5362
CREATE VIEW _13_list_of_distinct_verbatim_taxa_in_each_plot_in_each_project AS
......
5376 5376

  
5377 5377

  
5378 5378
--
5379
-- Name: VIEW _13_list_of_distinct_verbatim_taxa_in_each_plot_in_each_project; Type: COMMENT; Schema: public_validation_plots; Owner: -
5379
-- Name: VIEW _13_list_of_distinct_verbatim_taxa_in_each_plot_in_each_project; Type: COMMENT; Schema: public_validations_plots; Owner: -
5380 5380
--
5381 5381

  
5382 5382
COMMENT ON VIEW _13_list_of_distinct_verbatim_taxa_in_each_plot_in_each_project IS 'Note: Must perform equivalent concatenation of taxonomic field in source db.
......
5384 5384

  
5385 5385

  
5386 5386
--
5387
-- Name: _14_count_of_indiv_per_verbatim_taxon_per_plot_in_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5387
-- Name: _14_count_of_indiv_per_verbatim_taxon_per_plot_in_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5388 5388
--
5389 5389

  
5390 5390
CREATE VIEW _14_count_of_indiv_per_verbatim_taxon_per_plot_in_each_project AS
......
5407 5407

  
5408 5408

  
5409 5409
--
5410
-- Name: VIEW _14_count_of_indiv_per_verbatim_taxon_per_plot_in_each_project; Type: COMMENT; Schema: public_validation_plots; Owner: -
5410
-- Name: VIEW _14_count_of_indiv_per_verbatim_taxon_per_plot_in_each_project; Type: COMMENT; Schema: public_validations_plots; Owner: -
5411 5411
--
5412 5412

  
5413 5413
COMMENT ON VIEW _14_count_of_indiv_per_verbatim_taxon_per_plot_in_each_project IS 'Note: Must do equivalent concatenation of taxonomic field in source db.
......
5415 5415

  
5416 5416

  
5417 5417
--
5418
-- Name: _15_pct_cover_of_each_verb_taxon_in_each_plot_in_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5418
-- Name: _15_pct_cover_of_each_verb_taxon_in_each_plot_in_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5419 5419
--
5420 5420

  
5421 5421
CREATE VIEW _15_pct_cover_of_each_verb_taxon_in_each_plot_in_each_project AS
......
5439 5439

  
5440 5440

  
5441 5441
--
5442
-- Name: VIEW _15_pct_cover_of_each_verb_taxon_in_each_plot_in_each_project; Type: COMMENT; Schema: public_validation_plots; Owner: -
5442
-- Name: VIEW _15_pct_cover_of_each_verb_taxon_in_each_plot_in_each_project; Type: COMMENT; Schema: public_validations_plots; Owner: -
5443 5443
--
5444 5444

  
5445 5445
COMMENT ON VIEW _15_pct_cover_of_each_verb_taxon_in_each_plot_in_each_project IS 'Applies to: aggregate-cover plots only
......
5450 5450

  
5451 5451

  
5452 5452
--
5453
-- Name: _17_count_of_subplots_per_plot_for_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5453
-- Name: _17_count_of_subplots_per_plot_for_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5454 5454
--
5455 5455

  
5456 5456
CREATE VIEW _17_count_of_subplots_per_plot_for_each_project AS
......
5468 5468

  
5469 5469

  
5470 5470
--
5471
-- Name: _18_list_of_subplots_codes_for_each_plot_for_each_project; Type: VIEW; Schema: public_validation_plots; Owner: -
5471
-- Name: _18_list_of_subplots_codes_for_each_plot_for_each_project; Type: VIEW; Schema: public_validations_plots; Owner: -
5472 5472
--
5473 5473

  
5474 5474
CREATE VIEW _18_list_of_subplots_codes_for_each_plot_for_each_project AS
......
5485 5485

  
5486 5486

  
5487 5487
--
5488
-- Name: VIEW _18_list_of_subplots_codes_for_each_plot_for_each_project; Type: COMMENT; Schema: public_validation_plots; Owner: -
5488
-- Name: VIEW _18_list_of_subplots_codes_for_each_plot_for_each_project; Type: COMMENT; Schema: public_validations_plots; Owner: -
5489 5489
--
5490 5490

  
5491 5491
COMMENT ON VIEW _18_list_of_subplots_codes_for_each_plot_for_each_project IS 'DOESN''T YET WORK PROPERLY
5492 5492
';
5493 5493

  
5494 5494

  
5495
SET search_path = public_validation_traits, pg_catalog;
5495
SET search_path = public_validations_traits, pg_catalog;
5496 5496

  
5497 5497
--
5498
-- Name: _01_count_records; Type: VIEW; Schema: public_validation_traits; Owner: -
5498
-- Name: _01_count_records; Type: VIEW; Schema: public_validations_traits; Owner: -
5499 5499
--
5500 5500

  
5501 5501
CREATE VIEW _01_count_records AS
......
5506 5506

  
5507 5507

  
5508 5508
--
5509
-- Name: _02_count_trait_names; Type: VIEW; Schema: public_validation_traits; Owner: -
5509
-- Name: _02_count_trait_names; Type: VIEW; Schema: public_validations_traits; Owner: -
5510 5510
--
5511 5511

  
5512 5512
CREATE VIEW _02_count_trait_names AS
......
5517 5517

  
5518 5518

  
5519 5519
--
5520
-- Name: _03_list_trait_names; Type: VIEW; Schema: public_validation_traits; Owner: -
5520
-- Name: _03_list_trait_names; Type: VIEW; Schema: public_validations_traits; Owner: -
5521 5521
--
5522 5522

  
5523 5523
CREATE VIEW _03_list_trait_names AS
......
5529 5529

  
5530 5530

  
5531 5531
--
5532
-- Name: _04_count_records_per_trait; Type: VIEW; Schema: public_validation_traits; Owner: -
5532
-- Name: _04_count_records_per_trait; Type: VIEW; Schema: public_validations_traits; Owner: -
5533 5533
--
5534 5534

  
5535 5535
CREATE VIEW _04_count_records_per_trait AS
......
5543 5543

  
5544 5544

  
5545 5545
--
5546
-- Name: _05_count_taxa; Type: VIEW; Schema: public_validation_traits; Owner: -
5546
-- Name: _05_count_taxa; Type: VIEW; Schema: public_validations_traits; Owner: -
5547 5547
--
5548 5548

  
5549 5549
CREATE VIEW _05_count_taxa AS
......
5553 5553

  
5554 5554

  
5555 5555
--
5556
-- Name: VIEW _05_count_taxa; Type: COMMENT; Schema: public_validation_traits; Owner: -
5556
-- Name: VIEW _05_count_taxa; Type: COMMENT; Schema: public_validations_traits; Owner: -
5557 5557
--
5558 5558

  
5559 5559
COMMENT ON VIEW _05_count_taxa IS 'Note: No morphospecies in trait table, therefore count taxon + authority only
......
5561 5561

  
5562 5562

  
5563 5563
--
5564
-- Name: _06_list_taxa; Type: VIEW; Schema: public_validation_traits; Owner: -
5564
-- Name: _06_list_taxa; Type: VIEW; Schema: public_validations_traits; Owner: -
5565 5565
--
5566 5566

  
5567 5567
CREATE VIEW _06_list_taxa AS
......
5572 5572

  
5573 5573

  
5574 5574
--
5575
-- Name: VIEW _06_list_taxa; Type: COMMENT; Schema: public_validation_traits; Owner: -
5575
-- Name: VIEW _06_list_taxa; Type: COMMENT; Schema: public_validations_traits; Owner: -
5576 5576
--
5577 5577

  
5578 5578
COMMENT ON VIEW _06_list_taxa IS 'Note 1: No morphospecies in trait table, use taxon + authority 
......
5581 5581

  
5582 5582

  
5583 5583
--
5584
-- Name: _07_trait_value_and_units_for_first_5000_records; Type: VIEW; Schema: public_validation_traits; Owner: -
5584
-- Name: _07_trait_value_and_units_for_first_5000_records; Type: VIEW; Schema: public_validations_traits; Owner: -
5585 5585
--
5586 5586

  
5587 5587
CREATE VIEW _07_trait_value_and_units_for_first_5000_records AS
......
5596 5596

  
5597 5597

  
5598 5598
--
5599
-- Name: _08_taxon_trait_and_value_for_first_5000_records; Type: VIEW; Schema: public_validation_traits; Owner: -
5599
-- Name: _08_taxon_trait_and_value_for_first_5000_records; Type: VIEW; Schema: public_validations_traits; Owner: -
5600 5600
--
5601 5601

  
5602 5602
CREATE VIEW _08_taxon_trait_and_value_for_first_5000_records AS
......
11362 11362

  
11363 11363

  
11364 11364
--
11365
-- Name: public_validation_plots; Type: ACL; Schema: -; Owner: -
11365
-- Name: public_validations_plots; Type: ACL; Schema: -; Owner: -
11366 11366
--
11367 11367

  
11368
REVOKE ALL ON SCHEMA public_validation_plots FROM PUBLIC;
11369
REVOKE ALL ON SCHEMA public_validation_plots FROM bien;
11370
GRANT ALL ON SCHEMA public_validation_plots TO bien;
11371
GRANT USAGE ON SCHEMA public_validation_plots TO bien_read;
11372
GRANT USAGE ON SCHEMA public_validation_plots TO public_;
11368
REVOKE ALL ON SCHEMA public_validations_plots FROM PUBLIC;
11369
REVOKE ALL ON SCHEMA public_validations_plots FROM bien;
11370
GRANT ALL ON SCHEMA public_validations_plots TO bien;
11371
GRANT USAGE ON SCHEMA public_validations_plots TO bien_read;
11372
GRANT USAGE ON SCHEMA public_validations_plots TO public_;
11373 11373

  
11374 11374

  
11375 11375
--
11376
-- Name: public_validation_specimens; Type: ACL; Schema: -; Owner: -
11376
-- Name: public_validations_specimens; Type: ACL; Schema: -; Owner: -
11377 11377
--
11378 11378

  
11379
REVOKE ALL ON SCHEMA public_validation_specimens FROM PUBLIC;
11380
REVOKE ALL ON SCHEMA public_validation_specimens FROM bien;
11381
GRANT ALL ON SCHEMA public_validation_specimens TO bien;
11382
GRANT USAGE ON SCHEMA public_validation_specimens TO bien_read;
11383
GRANT USAGE ON SCHEMA public_validation_specimens TO public_;
11379
REVOKE ALL ON SCHEMA public_validations_specimens FROM PUBLIC;
11380
REVOKE ALL ON SCHEMA public_validations_specimens FROM bien;
11381
GRANT ALL ON SCHEMA public_validations_specimens TO bien;
11382
GRANT USAGE ON SCHEMA public_validations_specimens TO bien_read;
11383
GRANT USAGE ON SCHEMA public_validations_specimens TO public_;
11384 11384

  
11385 11385

  
11386 11386
--
11387
-- Name: public_validation_traits; Type: ACL; Schema: -; Owner: -
11387
-- Name: public_validations_traits; Type: ACL; Schema: -; Owner: -
11388 11388
--
11389 11389

  
11390
REVOKE ALL ON SCHEMA public_validation_traits FROM PUBLIC;
11391
REVOKE ALL ON SCHEMA public_validation_traits FROM bien;
11392
GRANT ALL ON SCHEMA public_validation_traits TO bien;
11393
GRANT USAGE ON SCHEMA public_validation_traits TO bien_read;
11394
GRANT USAGE ON SCHEMA public_validation_traits TO public_;
11390
REVOKE ALL ON SCHEMA public_validations_traits FROM PUBLIC;
11391
REVOKE ALL ON SCHEMA public_validations_traits FROM bien;
11392
GRANT ALL ON SCHEMA public_validations_traits TO bien;
11393
GRANT USAGE ON SCHEMA public_validations_traits TO bien_read;
11394
GRANT USAGE ON SCHEMA public_validations_traits TO public_;
11395 11395

  
11396 11396

  
11397 11397
--
trunk/validation/aggregating/plots/bien3_validations_salvias_vegbien.sql
18 18
-- Currently configured for SALVIAS
19 19
-- ------------------
20 20

  
21
SET search_path TO public_validation_plots, public;
21
SET search_path TO public_validations_plots, public;
22 22

  
23 23
-- ------------------
24 24
-- 1. Count of projects
trunk/validation/aggregating/specimens/qualitative_validations_specimens.sql
7 7
-- Host: vegbiendev.nceas.ucsb.edu
8 8
-- -------------------------------------------------------------------------
9 9

  
10
SET search_path TO public_validation_specimens, public;
10
SET search_path TO public_validations_specimens, public;
11 11

  
12 12
-- -------------------------------
13 13
-- 1. Count of total records (specimens) in source db
trunk/validation/aggregating/traits/bien3_validations_traits_bien3.sql
5 5
-- Host: vegbiendev.nceas.ucsb.edu
6 6
-- -------------------------------------------------------------------------------
7 7

  
8
SET search_path TO public_validation_traits, public;
8
SET search_path TO public_validations_traits, public;
9 9

  
10 10
-- ------------------
11 11
-- 1. Count records

Also available in: Unified diff