the simple idea we have about GUID is that it’s unique, but how GUIDs are generated ? could we generate two identical GUIDs based on the same generation methods used.
Share
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.
GUIDS aren’t guaranteed to be unique, however they are said to be “statistically unique” since the probability of creating the same guid twice is statistically insignificant. For all intensive purposes, you’ll be safe to assume that any GUID you create (properly) is unique.
As to how GUIDs are generated, they use different algorithms depending on the type of GUID. For instance, SQL Server’s “uniqueidentifier” datatype uses a V4 GUID which is based on a pseudorandom data generator whereas other versions of GUIDs can be based on hash functions or a combination of MAC adress and time.
Is it possible to generate a duplicate GUID? Well of course, but the chances of it happening are just statistically insignificant.
Trust the GUID. It exists to make your life easier 🙂