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 148637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:59:40+00:00 2026-05-11T08:59:40+00:00

We are building an application that may need to be replicated to many servers

  • 0

We are building an application that may need to be replicated to many servers (I’m hoping not, but there’s no way to know if clients will need their own client/server copy until after we release the online product).

Since the number of servers is unknown, I’ve decided to use GUIDs for any transactional table IDs. Since each client has their own database, I intend to use the NEWSEQUENTIALID() default, and the largest table will add no more than 1.5M rows per year (but on average 15K rows), I don’t expect much of a performance problem.

However, I’m not sure how to handle cases where we want the foreign key to indicate ‘none selected’. For example, a client has a single admin user. This is set up as a foreign key (login_id) to login.id (a GUID). However, if a client doesn’t yet have an admin user, how would we easily set up a ‘None Selected’ key?

In prior applications we used IDENTITY columns, and inserted a dummy entry in most tables with an ID of 0. Is there an accepted approach to providing similar functionality with a GUID?

  • 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. 2026-05-11T08:59:40+00:00Added an answer on May 11, 2026 at 8:59 am

    You have 3 options:

    1) In your referenced table, add the blank value row with a guid of all zeros, then link to this record

    2) Just store a null for the blank references

    3) Don’t have the blank records in the reference table, but store an all zero guid. This may cause problems if joins are done in in the database, or with reports. You’ll have to code for this special case.

    I’d say 1 and 2 are the only good options.

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

Sidebar

Related Questions

My company is building a Flex application that we may need to port to
I'm building an application (both client and sever sides) that may need to send
I am building an application, that will need to gather data from many http
I'm building an application that needs to fire an event every second, but it
We're building an application that is a Silverlight client application, but we've created an
I'm building an application that opens existing mail messages in Outlook. The user may
I am building a MVC 3 application where the users may not be in
I'm building a Flex application that will need run under two different deployment scenarios:
I'm building an application on node.js that has users and products in a many-to-many
We are currently building a web-based application that has the need to associate a

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.