GUID for Other Databases?GUID for Other Databases?
Old forum URL: forums.lhotka.net/forums/t/97.aspx
vbexpert posted on Sunday, May 14, 2006
A question may not releated to CSLA. I'm planning to develop an application using CSLA and GUID for primary key. To fulfill the requirement from different customer, the database may not be MS SQL. Is GUID supported in other major database like Oracle or DB2?
Thanks
pelinville replied on Sunday, May 14, 2006
Not all do. We use pervasive and it does not.
Still use guids though, just a 32 char field. Works fine. Have made a smartguid that converts it to the proper format.
xal replied on Sunday, May 14, 2006
It's a bad idea to store guids as strings since they will occupy a lot more that they should.
GUIDs are binary data and that text you see is a hex representation of that.
Guids are 16 bytes. Used as strings it can be 32 / 36 bytes (depending on the "-"s). Or double that if you store them as a unicode string. So storing 72 bytes for something that really is 16 is _bad_.
Read this thread for more info:
http://www.searchcsla.com/Details.aspx?msn_id=22852
(Although there are probably many threads that talk about guids in the old forum)
Andrés
Copyright (c) Marimer LLC