亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

actionscript - Vehicle driving trajectory table design Mongodb
大家講道理
大家講道理 2017-05-02 09:26:33
0
2
1372

Encountered a technical problem
For monitoring the driving paths of nearly 10,000 vehicles (or even more), when I was designing the database (mongdo) table (collection), I had 2 options
1. By day Divided into tables, all vehicle trajectories for each day are placed in one table
2. Divided into tables according to vehicles, each license plate corresponds to a table

What do you think is reasonable?

大家講道理
大家講道理

光陰似箭催人老,日月如移越少年。

reply all(2)
小葫蘆

Your demand is a very common one, usually called Time Series data modeling.

1. It is not recommended to divide collections into different collections by day/car;

2. If you have a particularly large number of documents, you can consider Sharding.

Because you reveal less information, if you get the car’s position every minute, you might as well try the following method:

{ plate : String,
  brand : String,
  color :  String,
  timestamp_hour : ISODate,
  track : [{0 : [Longitude, latitude]},
           {1 : [xxx, xxx]}
           ...
           {59 : [xxx, xxx]}]
 }

The general idea is to try to make one document contain as much information as possible to improve query efficiency.

For reference.

Love MongoDB! Have Fun!


MongoDB Online Lecture Series 19- MongoDB 10 steps to build a single view

It’s April 19th, please click:>---<

我想大聲告訴你

You need to consider the specific business scenario, how to display the data, and the display dimensions.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template