Sample Header Ad - 728x90

Best way to model a database structure to store multidimensional variables?

5 votes
4 answers
1242 views
I am working with some NetCDF data which has multidimensional variables. - As far as I'm aware, the fields are not mandatory. - Each variable will have the same fields/attributes. - Each variable represents a measurement of the atmosphere, in time & space. Level represents a pressure level (like a layer of an onion -- a thick layer). For example, a variable called *SO2* (Sulphur Dioxide) may be *4-D*: Time, Level (pressure), latitude, longitude. I have about 14 variables that I need to store. **Data retrieval tendencies** Now, I'm going to need to query this data and ask questions like: - Give me all the rows for variable *SO2* that fall between latitude *X* and longitude *Y* at time *T* and level *L*. - What is the average temperature for time *T* at level *L*? - etc... **Current considerations** I could let each row in my DB be an observation and have the columns: type, lat, long, time, level, value. Or, perhaps create a table for each kind of variable and have the columns: lat, long, time, level, value. I'm not sure which will be more appropriate, or whether there is a better option, so I'd appreciate some advice.
Asked by pookie (181 rep)
Feb 8, 2017, 08:43 PM
Last activity: Aug 6, 2017, 04:59 PM