Hi Mansoor.
We are glad you reached out to us. The calculation performed here approximates our storage need to design Yelp.
Total_Area_of_Earth = 60M sq miles.
Search_Radius = 10 miles.
Num_of_Segments => 60/10 = 6M.
We assume 500M places (Num_of_Places) will be in the Total_Area_of_Earth.
We are assuming each Segment_ID and Place_ID to take 8 bytes.
Total_Space = (Number_of_Segments * Segment_ID_size) + (Num_of_Places * Place_ID_size) = (6M * 8) + (500M * 8)
= 48000000 + 4000000000 => 4048 MB or 4.048 GB
We are also adding these detailed calculations to the lesson in the next update.
I hope that clears up the confusion. If you have any other questions, feel free to reach out to us.
Thank you.
@micro_service_3699 Thank you for the detailed response.