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

  • Home
  • SEARCH
  • 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 455301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:21:25+00:00 2026-05-12T22:21:25+00:00

Is it easier to implement domain-driven design when using guids as identity fields instead

  • 0

Is it easier to implement domain-driven design when using guids as identity fields instead of auto incrementing integers? With guids you don’t have to jump to the database to get the actual value.

  • 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-12T22:21:25+00:00Added an answer on May 12, 2026 at 10:21 pm

    Well, GUIDs are easy and look like the best fit. They’re tempting to frontend programmers, since they don’t have to deal with the database.

    On the other hand, when looking at the potential drawbacks they have when used without thinking about database issues too much, I would warn against them as much as possible.

    The question really is: do you really need to know the ID of the entity before it’s stored in the databsae? REALLY? WHY?

    If you do decide to go with GUIDs in the end, and if you’re using SQL Server as your database backend (I don’t know enough about other RDBMS to make an informed suggestion), I would strongly recommend you make absolutely sure that the GUIDs are not being used as the clustering key on the tables. This will kill your performance – no doubt.

    If you do use GUIDs as your primary key, make sure to use something else, some other column that wrecks less havoc on your database, as your clustering key instead – a INT IDENTITY would be my first choice.

    Check out these articles by Kimberly Tripp on why a GUID is definitely not a good idea as a clustering key in a SQL Server database – she’s the ultimate guru when it comes to indexing and performance issues with indexing and she can makes those points much better than I ever could:

    • GUIDs as PRIMARY KEYs and/or the clustering key
    • The Clustered Index Debate Continues…
    • Ever-increasing clustering key – the Clustered Index Debate……….again!

    Marc

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

Sidebar

Ask A Question

Stats

  • Questions 212k
  • Answers 212k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can just set the isolation level in a query… May 12, 2026 at 10:21 pm
  • Editorial Team
    Editorial Team added an answer This is for the case where you are using anonymous… May 12, 2026 at 10:21 pm
  • Editorial Team
    Editorial Team added an answer It's not immediate. Google does crawl some sites a lot… May 12, 2026 at 10:21 pm

Related Questions

I am learning the Passive View pattern to keep my C# WinForms application easier
In the office here we have a startup script that runs on the server
So, let's say I have this code (VB.Net): Sub Main() dim xxx as string
I'm working on a car dealer website at the moment, and I've been working
I'm a pretty young developer, and still in the emulation phase of my career.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.