Baidu AI Cloud
中国站

百度智能云

Time-Spatial Database

Data Structure

Single-field:

We use the demonstration database provided by TSDB to illustrate the data structure. For details, see Operation Guide for the demonstration database.

The demonstration database contains data (non-real data) such as temperature, humidity, wind, PM2.5, and ultraviolet index collected by multiple air monitoring stations in Beijing, Shanghai and Guangzhou in 2015. The data is from multiple air monitoring stations in each city.

In TSDB, the temperature, humidity, wind, PM2.5, and ultraviolet index are all represented by metrics, which indicate monitoring dimensions. Different cities and different air monitoring stations (represented by different longitudes and latitude) are represented by Tags. Taking the temperature as an example, the image is shown as follows.

Image

If we want to view the average temperature of each month in Beijing, Shanghai and Guangzhou in 2015, we perform AVG aggregation by a 1-month sampling cycle and group it by a city tag. The following chart can be drawn:

Image

For more operations, see Operation Guide for the demonstration database.

Multi-field:

The multi-field structure allows multiple fields under the same metric. For example, wind is vector data consisting of wind speed and wind direction, so that the wind speed and wind direction are suitable for storing as fields for wind (metric).

All query operations are required to specify a metric first, and if a multi-field structure is used, the values of multiple fields can be filtered in the same query and multiple fields can be simultaneously returned.

Image

Refer to the above image, if needing to query the case of wind (wind) in time of 1467627246000-1467627249000, you can jointly query the values of multiple fields to get the data in the image below.

Image

Previous
Noun Interpretation
Next
System Limit