Back to list
Views:   8.1K
Replies:  3

Is it possible to use Guid as a primary key?

We're developing a system as a high availability solution, using ADO.NET Sync Services for a database replication. This means that the primary key on tables should not be auto-increment integer, we will probably use Guid instead. 

Deciding which architecture to use I wonder if Spark or Patterns Framework solution can be modified to support this scenario? 

Martin Hren, Aug 13, 2014
Reply 1
Hi Jack,

Hope this support will be included in future releases, it would really expand the list of scenarious where this product can be used. Now we choosed to go with EF 6.

Mike - I'm aware of performance impact that this concept can bring up later, but we'll stick with it, using sequential generated keys to reduce it to minimum.

Martin Hren, Aug 26, 2014
Reply 2

I think you should not use GUID as the primary since they make database very slow over time.
instead continue using GUID for uniqueness purpose then used number as primary key. 

Mike Maseko, Aug 24, 2014
Reply 3
Hello Martin:

Currently, the SPARK platform does not  formally support GUID as primary key.  
The reason it that in almost all situations it is better to use int or long rather than GUID.

However, there are some (distributed) situations in which GUID is a reasonable option.
We are currently reviewing whether GUID primary keys will be supported in the next release.

Hope this helps.

Jack Poorte, Aug 18, 2014
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.