Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.sqlserver.programming > #31271

Re: Unique Constraint Based on Dual GUID

Newsgroups microsoft.public.sqlserver.programming
Date 2015-08-11 20:13 -0700
References <mqbsbp$9va$1@dont-email.me> <a6978bfd-b275-468c-9c7d-a4a64b2e9f4a@googlegroups.com>
Message-ID <cb58131a-eab8-48e9-b21d-f27cb8ede03a@googlegroups.com> (permalink)
Subject Re: Unique Constraint Based on Dual GUID
From rpresser <rpresser@gmail.com>

Show all headers | View raw


On Tuesday, August 11, 2015 at 6:30:24 PM UTC-4, --CELKO-- wrote:

> In SQL, we would have UNIQUE (a, b) and CHECK (a < b) instead. 

Addressing this and only this point you've made, and not addressing flaws
in the original poster's model (which you have already done):

There is no guarantee that the left side GUID actually is less than the
right side; your check constraint would very likely prevent adding references
to the join table.  

Back to microsoft.public.sqlserver.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Unique Constraint Based on Dual GUID Michael Cole <invalid@invalid.com> - 2015-08-11 14:07 +1000
  Re: Unique Constraint Based on Dual GUID Erland Sommarskog <esquel@sommarskog.se> - 2015-08-11 21:35 +0200
  Re: Unique Constraint Based on Dual GUID rpresser <rpresser@gmail.com> - 2015-08-11 12:46 -0700
  Re: Unique Constraint Based on Dual GUID --CELKO-- <jcelko212@earthlink.net> - 2015-08-11 15:30 -0700
    Re: Unique Constraint Based on Dual GUID rpresser <rpresser@gmail.com> - 2015-08-11 20:13 -0700
  Re: Unique Constraint Based on Dual GUID --CELKO-- <jcelko212@earthlink.net> - 2015-08-12 18:26 -0700
    Re: Unique Constraint Based on Dual GUID Michael Cole <invalid@invalid.com> - 2015-08-13 11:59 +1000

csiph-web