Interview Bootcamp
Ask Author
Back to course home

0% completed

Vote For New Content
In yelp design, I am unable to understand the Grid system. How does the logic kn...

Furquan Amanat

Dec 31, 2021

In yelp design, I am unable to understand the Grid system. How does the logic knows Grid from the Long and Lat. When I look at the Query "Select * from Places where Latitude between X-D and X+D and Longitude between Y-D and Y+D and GridID in (GridID, GridID1, GridID2, ..., GridID8)" What I dont understand is how does GridID is being retrieved. Is that in the table for Long and Lat or some other way, I will appreciate an explanation in terms of how do System know the Grid when looking a specific Long and Lat location given that I dont see any relation between them from table structure or any other way

0

0

Comments
Comments
Design Gurus
Design Gurus4 years ago

Imagine an 8 x 8 square grid. Now imagine we break this square into 1 x1 boxes. How can you find the box, say, at 6 x 7?

6 and 7 are equivalent to lat and log here.