Ooh, this has all the makings of a religious war <mg>.

Just to weigh in, I think that the 'right' strategy is use-case
dependent.  They all have their well-known pro's and con's, and the
appropriate balance depends upon your application.  As an example, one
of our systems uses identity columns exclusively because making data
manipulation easy for a DBA is very important in that application;
another uses a mix of hi/lo integers for efficiency with GUID's in a
couple of tables that need 'guaranteed' uniqueness.  It really depends
on your particular circumstance, and IMHO all these blanket statements
simply show a narrow-minded approach to problem solving.

That said, I personally loathe GUID's because I think that they're a
'lazy' and fragile solution to the guaranteed-unique-id problem (and
they're only unique if generated in the "approved" manner - which is not
what happens with most of them).  I'd prefer some form of namespacing
construct (think SNMP OID's, or DNS if you're not old enough) for things
which _must_ be unique, but in the real world GUID's are the best we've
got so I use them when appropriate.

Gunnar - sorry, looks like I've brought out my bucket now!!

/Pete

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Oskar Berggren
Sent: 29 November 2012 10:02
To: [email protected]
Subject: Re: [nhusers] Re: SQL Server Identity and Nhibernate.... what
is the latest story?

2012/11/28 costa <[email protected]>:
> I wouldn't think twice about getting rid of them. They might be
appropriate
> in some cases (maybe you have some data that needs to interface with a
> external system?)  but don't use them in all of your tables!

"interface to external system" should not be underestimated. (Don't
most systems nowadays? Or often will do at a later stage?) Anyway, I
find that everything becomes so much easier when "any" involved
component can easily create a new identifier and reference it even
before some particular storage component have blessed the object. GUID
is one possible solution.

/Oskar

-- 
You received this message because you are subscribed to the Google
Groups "nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.


!DSPAM:1,50b732d05501085516068!


-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to