Back to course home
0% completed
Vote For New Content
how did we get 500K with 4 bytes? Using base 64, we should get about 16K ids.
Krispy Donut
Oct 1, 2021
how did we get 500K with 4 bytes? Using base 64, we should get about 16K ids.
1
0
Comments
Comments
Design Gurus4 years ago
What chapter are you referring to? Is this in Yelp design?
E
Evan 4 years ago
I believe he's referring to this part in Section 4. Database Schema:
Although a four bytes number can uniquely identify 500M locations, with future growth in mind, we will go with 8 bytes for LocationID.
Design Gurus4 years ago
We don't need base 64 encoding. A four byte number can give us 2^32 unique IDs.
E
Evan 4 years ago
Assuming "500K" in the question was a typo (should have been "500M" per the course material), 4 bytes * 8 bits is 32, and 2^32 yields 4,294,967,296 potential values.
Design Gurus4 years ago
That's correct.