AnsweredAssumed Answered

Displaying 1-to-many relationship in Javascript

Question asked by keitheweber on Apr 21, 2015
Latest reply on Apr 23, 2015 by keitheweber

Hello,

 

Description of data

The data being collected is environmental data from one device with multiple sensors. There is one location and time stamp with multiple environmental measurements. For example, at 10:00 am on 1/1/15 at some coordinate, the temperature was x, the wind speed was y and the wind direction was z. Different devices collect different types of measurements. The way that the database schema is setup is to have a feature class containing points and a separate table for measurements, where there are multiple measurements per point.

 

Point Table

Point ID

Shape

TimeStamp

 

Measurement Table

Measurement ID

Measurement Type

Measurement Value

Measurement Units

Point ID

 

The two tables are linked using the Point ID.

 

Desired Functionality

My web application is a viewer into an archive of measurements. It's purpose is to allow the user to fill in some query criteria and subset the data that is in the view. An example query would be something like displaying all the points between date x and date y where wind speed was collected.

 

The problem

This would normally be handled simply by setting a definition expression like MeasurementTbl.MeasurementType = "wind speed", but the problem is that the spatial table containing the point has a 1-to-many relationship to the measurements table and when creating a join, the result is that only the first measurement record is paired with a point in the resulting layer. For example, for a point with two measurements, say wind speed and temperature, if temperature is the first record to be paired to the point record, the wind speed record is lost.

 

Any suggestions would be greatly appreciated!

Outcomes