1

I have a question please. I have this data and I want to insert in my SQL using python. I have created a table with 4 columns. for ID, title, description and geolocation respectively. My question is, for id (int), for title (varchar), for description (varchar). However, for geolocation I am confused. I have Loc and Lat together. I was told not to use varchar. So I used decimal, float and it did not work. The only hint given to me is I have 2 floats and that is how the data-type should be. What can I do?

('3', "Τάφρος Ντ'Αβίλα (D'Avila)", '-1', '35.169194,33.363113')

1 Answer 1

1

If you intend to use a SPATIAL index to make certain searches more efficient, then see the POINT datatype.

Otherwise, consider using two FLOATs. That gives a resolution of 1.7 meters (5.6 feet).

If you will have a billion data points, the size of the datatype used matters; see http://mysql.rjweb.org/doc.php/latlng#representation_choices

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.