L
L
lxfr2017-04-14 15:52:30
MySQL
lxfr, 2017-04-14 15:52:30

How to store the position of a point in the database in this particular case?

Hello colleagues.
There is little need to design the storage of a field point in a database - for example the current mouse position.
A field is, roughly speaking, a screen (the whole one) divided into equal squares (for ease of understanding, imagine that your screen is divided by a grid into squares centimeter by centimeter). I see it like this: I store 2 values ​​- the X-coordinates and the Y-coordinates. There are no problems with this, it's like a game of sea battle (if anyone remembers such a game).
BUT :)
The problem starts when I have the Nth number of such screens, for example 100, it turns out that I need to store already 3 numbers, [screen number | field] , [X-coordinates], [Y-coordinates]
And the most important question: if I need to store a lot of such points (I draw your attention to the fact that only realtime numbers are needed, no storage history is needed), in general, if I have a lot of such points, where can I store a bunch of my points (consisting of 3 numbers)? For example, I need to store a thousand such points in real time.
Sql/nosql what advice will be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Smithson, 2017-04-14
@lxfr

You can store 100 x 3 int even in a text file, a more or less modern (not older than 2000 year of birth) computer will cope with their processing without any effort.
Now, if there can be 100 million points of commercials - then you need to think about the storage format. Though sql will pull, with indexes on screens it will be normal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question