UCHIC/ODM2 — pull request #40 by aufdenkampe (2014-03-15 01:50:40+00:00)
Title: Review Results_mods branch.  Merge into master?

I implemented the "perfect compromise" ideas that came to me right at the very end of our post-lunch discussion at USU today.

In short, I made a new ResultValueCoverages table that is a subclass of ResultValues (i.e. same primary key and 1:1 (or 1:0) relationship). I moved the X, Y, Z location information into this subclass table, which I *think* is a great compromise because it:
* decreases the complexity (and width) of ResultValues, which will be our HUGE table in ODM2.
* minimizes the join cost when the X, Y, Z info is needed, because both tables share a primary key.
* adds better defined flexibility to allow for Coverage Dimensions that might be non-spatial, via the explicit CoverageTypeCV table, while still defining them as X, Y, Z. This will allow for spectra and other array types where the ResultValues.DataValues all have the same Variable and Unit (i.e. one can not use this to store a typical data table as an array). I spent some time looking at the UniData Common Data Model (CDM), and I think we can accommodate all of their coverage types with this approach.

Please look at my commit notes and also at the table and field comments, and the Notes fields in the schema diagrams. I put a lot of info in those that are relevant to fully understanding my suggested changes.