In a MySQL database I have tracking data of animals (elephants). Currently the design is a follows:
timestamp(INT) | individualID(INT) | longitude(DECIMAL) | latitude(DECIMAL)
Now I'd like to ask several questions to the database
- What is the closest individual at time t?
- Which individuals are around (perimeter 50km) at time t?
- Which individuals are present in the reservation at time t? (reservation is given by a polygon)
Is there some built-in functionality available for MySQL? Should I choose a different database?