If you look at facebook’s graph API, it seems as though all objects share the same ID space, and all Ids are unique even if they are in different tables.
Is there a feature in MySQL that handles this? (if not, high level idea of how to implement?)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may want to check out
UUID(). It returns a globally unique ID so your IDs will never clash.To convert it to integer format, you can
for storing in a
BINARY(16)column.(Source for converting to integer: Nicholas Sherlock’s comment at MySQL reference)