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 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

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The Arduino environment uses the AVR version of the GCC… May 11, 2026 at 12:31 pm
  • added an answer You can use a pthread condition to wait until the… May 11, 2026 at 12:31 pm
  • added an answer GAE has a limit of 10MB each on static files… May 11, 2026 at 12:31 pm

Related Questions

We are building an application on an embedded platform that needs a reasonably high
So we are building an application with a UI Layer (web, mobile, Ajax client,
We are building an enterprise application in which we will incorporate multiple platforms for
We are building an AbleCommerce 7 web store and trying to integrate it with
We are building a training website where we need to track viewers watching videos
We are getting very slow compile times, which can take upwards of 20+ minutes
I suppose most of the developers have an idea of multi-layer architecture. We have
I want to know I can dynamically modify an existing Crystal Report (using C#

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.