Hi everyone. I have a simple question.
Toda, we can use an Id as a Guid (16-bytes data structure), but, in NHibernate we have two algoritms to use this strategy for Ids. The Guid and Guid.Comb. Look at the code, the Guid just use Guid.NewGuid() from .Net Framework and Guid.Comb has an algorithm that I don't understand very much, but I would like to know more about this topic.
In the Nhibernate Docs I found this about Guids
The guid identifier is generated by calling Guid.NewGuid(). To address some of the performance concerns with using Guids as primary keys, foreign keys, and as part of indexes with MS SQL the guid.comb can be used. The benefit of using the guid.comb with other databases that support GUIDs has not been measured.
What is the major difference? What situation should I use one or other? Is there any difference in the performance? I know it's difficult but can we have conflicts using Guid mapping instead using Guid.Comb in any database?
The projects we develop uses Ms Sql Server, Oracle and Mysql.
Thank you.
--
______________________________________
Felipe B Oriani