如何在数据库中存储8000亿个GPS标志物[英] How to store 800 billion GPS markers in database

本文是小编为大家收集整理的关于如何在数据库中存储8000亿个GPS标志物的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我需要存储用户记录到数据库的GPS轨道.这些轨道将每5米移动每5米的标记组成,以便在地图上绘制一条线.我估计为200公里的轨道,这意味着40,000个LNLT标记.我估计每种用户最少有50,000个用户和20件200公里的轨道.这意味着至少400亿个LNLT标记.

这也需要扩展,因此对于100万用户,我需要8000亿GPS标记的能力.

由于每组40,000个标记属于一个曲目,因此我们正在谈论1-2000万个唱片/集GPS轨道.

要求: 用户将要求在移动应用程序中的Google地图上查看这些曲目.

关系: 我目前有2张桌子.表One具有:[TrackID],[USERID],[注释],[距离],[time],[最高速度].

表2具有[TrackID] [经度] [Latitude],这是所有GPS标记的位置.在保持阅读性能的同时,什么是存储此卷GPS数据的有效方法?

新信息:

将GPS数据存储在KML文件中,目的是将其显示为Google Map顶部的曲目,是一个很好的解决方案,可保存数据库空间.将KML压缩到kmz(基本上是kml a a kmz扩展程序)中大大减少了文件大小. KMZ的加载比GPX快得多,并且可以与Google Maps API集成为KML层. 从Google中查看此信息以获取进一步的帮助.这似乎是迄今为止预期要求的最佳解决方案.

推荐答案

一如既往地选择特定数据库的选择与您要如何存储信息以及如何使用信息有关.因此,在不知道项目的确切要求以及数据关系的情况下,最好的办法是对该主题进行一些阅读,以确定哪种特定产品或存储模型最适合你.

一个很好的起点是阅读比较数据库的性能和用途的博客(请参阅附件):

vs-couchdb-vs-redis

本文地址:https://www.itbaoku.cn/post/597648.html

问题描述

I need to store GPS tracks that users record into a database. The tracks will consist of a marker every 5 meter of movement for the purpose of drawing a line on a map. I am estimating 200 km tracks which means 40,000 lnlt markers. I estimate 50,000 users minimum and 20 pieces of 200 km tracks for each. That means at least 40 billion lnlt markers.

This needs to scale too, so for 1 million users I need capacity for 800 billion GPS markers.

Since each set of 40,000 markers belong to a single track, we are talking 1 - 20 million records/sets of GPS tracks.

Requirements: Users will request to view these tracks on top of a Google map in a mobile application.

Relations: I currently have 2 tables. Table one has:[trackid], [userid], [comment], [distance], [time], [top speed].

Table 2 has [trackid] [longitude] [latitude] and this is where all GPS markers are stored. What is an efficient way of storing this volume of GPS data while maintaining read performance?

New information:

Storing the GPS data in a KML file for the purpose of displaying them as a track on top of a Google map is a good solution that saves database space. Compressing the KML into a KMZ (basically a zipped KML wit a KMZ extension) greatly reduces file size further. KMZ loads much quicker than GPX and can be integrated with the Google Maps API as a KML layer. See this information from Google for further assistance. This seems to be the best solution so far for the intended requirement.

推荐答案

The choice of a particular database, as always, is tied to how you want to store the information and how you want to use it. As such, without knowing the exact requirements of your project, as well as the relationships of the data, the best thing to do would be to do some reading on the topic to determine what particular product or storage model is best suited to you.

A good place to start is reading blogs that compare the performance and uses of the databases (see attached):

http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis