Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 584587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:54:49+00:00 2026-05-13T14:54:49+00:00

We use GUIDs extensively in our database design; Business Object properties provide Guid.Empty GUIDs

  • 0

We use GUIDs extensively in our database design; Business Object properties provide Guid.Empty GUIDs for DB null values and null is always saved to the database if the value is Guid.Empty.

Apart from Guid.Empty (00000000-0000-0000-0000-000000000000) how likely is it that a GUID will be generated with all the same characters e. g.: 11111111-1111-1111-1111-111111111111

Just considering using GUIDs like these for specific values.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:54:49+00:00Added an answer on May 13, 2026 at 2:54 pm

    In short: For GUID generated according to the published standards and specifications it simply can’t happen. A GUID has a structure and some of the fields actually have a meaning. What’s more, .NET generates GUIDs of version 4, where it absolutely can’t happen. They are defined in a way that there won’t be such a GUID. For details, see below 😉


    There are five to seven bits which are the main pitfall here. Those are the version identifier (the first four bits of part three) and the variant field specifying what variant of GUID this is.

    The version can be anything between 1 and 5 currently. So the only valid hex digits for which we could get such a GUID at this point are – obviously – 1 through 5.

    Let’s dissect the versions a little:

    1. MAC address and timestamp. Both are probably hard to coax into all-1 digits.
    2. MAC address and timestamp as well as user IDs. Same as for v1.
    3. MD5 hash. Could possibly even work.
    4. PRNG. Can’t ever work since the first digit of the fourth part is always either 8, 9, A or B. This contradicts the 4 for the version number.
    5. SHA-1 hash. Could possibly even work.

    So far we ruled out version 4 as impossible, others as highly unlikely. Lets take a look at the variant field.

    The variant field specifies some bit patterns for backwards compatibility (x is a don’t care), namely:

    0 x x Reserved. NCS backward compatibility.
    1 0 x The only pattern that currently can appear
    1 1 0 Reserved, Microsoft Corporation backward compatibility
    1 1 1 Reserved for future definition.
    

    Since this pattern is at the very start of the fourth part, this means that the most significant bit is always set for the very first hex digit of the fourth part. This means that this very digit can never be 1, 2, 3 or 5. Not counting already generated GUIDs, of course. But those with the MSB set to 0 happen to be either v1 or v2. And the timestamp part of those means that they would have to be generated some millenia in the future for that to work out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since, guid values will always be unique anyway why use a unique index. Isnt
What are the disadvantages of using GUIDs? Why not always use them by default?
My domain object doesn't use 2 non-nullable columns from a table in the database.
We use Guids as primary keys for entities in the database. Traditionally, we've followed
I'm trying to use EF4 and the supposedly new feature of having GUIDs generated
How are GUIDs generated in SQL Server? I understand that I should use newid()
I have this SP USE [TestDB] GO /****** Object: StoredProcedure [dbo].[sp_test] Script Date: 06/12/2010
I have some tests that use guids. The guids used don't need to be
I'm running NHibernate and SQL Server CE I am trying to use GUIDs as
Yesterday I asked Are GUIDs generated on Windows 2003 safe to use as session

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.