Home > database >  Trajectory data in the database design method
Trajectory data in the database design method

Time:09-24

大神们好,,,小弟最近在做一个类似百度鹰眼的运动轨迹跟踪项目,现在数据的来源有了,通过socket将数据发到服务端,但是问题来了,对于每个跟踪对象,每三分钟有一个定位信息(经纬度数据)要存储,我的想法是:给每个跟踪对象一个ID 作为关键字,但是接下来的 一连串的定位信息( 项目要求是保存跟踪对象的轨迹信息几个月甚至半年,ps:百度鹰眼提供一年,,,) ,我唯一的想法是 这个定位信息要包括(id, 时间,经纬度),但是我突然想到如果 就做这样的一个表的话 是不是会很有问题,,,,3分钟一个,,,半年=20*24*6*30=86400.,,,一个跟踪对象是86400,,, 那1000个不就 8000多万 个数据了,,,这样查询起来感觉不对啊,,,但是我也不知道怎么设计这个数据库才好,,,菜鸟一只,,,求大神给点意见思路,,,

CodePudding user response:

Design there are no problems, it is this train of thought, and then according to your plan to buy enough fast enough, storage and servers,

CodePudding user response:

Very suitable for using mongdb location index + automatic index date + automatic extension cluster

CodePudding user response:

reference 1st floor ACMAIN_CHM response:
design there are no problems, this is the way of thinking, and then according to your plan to buy enough fast enough, storage and servers,

A great god, and a table to put the Numbers of nearly one hundred million, I still feel that query or insert data more frequently, a bit flustered,,, , because this is a small project, with the server is currently mononuclear of ali cloud, cloud host 1 g,,,, I just started to contact database that, don't know this is not enough, enough, should be not enough,,, I suddenly thought of, now, for each of the tracking object to create a table to store the tracking information,,,, object of 1000 there were 1000 tables, and then id now before the table name here,,, the great god don't think possible,,, because I don't know,,, a mysql database can create more than 1000 tables,,, also not sure this will not have what not good place,,,

CodePudding user response:

reference u013682683 reply: 3/f
Quote: refer to 1st floor ACMAIN_CHM response:

Design there are no problems, it is this train of thought, and then according to your plan to buy enough fast enough, storage and servers,

A great god, and a table to put the Numbers of nearly one hundred million, I still feel that query or insert data more frequently, a bit flustered,,, , because this is a small project, with the server is currently mononuclear of ali cloud, cloud host 1 g,,,, I just started to contact database that, don't know this is not enough, enough, should be not enough,,, I suddenly thought of, now, for each of the tracking object to create a table to store the tracking information,,,, object of 1000 there were 1000 tables, and then id now before the table name here,,, the great god don't think possible,,, because I don't know,,, a mysql database can create more than 1000 tables,,, also not sure this will not have what not good place,,,

10 w form has no effect, as long as it is design patterns by the way, do you

CodePudding user response:

A great god, and to explore the trajectory of the study, want to and you can add me, my QQ, 6143962

CodePudding user response:

Why not reply?
  • Related