guid

Is a GUID unique 100% of the time?

Is a GUID unique 100% of the time? Will it stay unique over multiple threads? ...

GUIDs as Primary Keys - Offline OLTP

We are working on designing an application that is typically OLTP (think: purchasing system). However, this one in particular has the need that some users will be offline, so they need to be able to download the DB to their machine, work on it, and then sync back once they're on the LAN. I would like to note that I know this has been do...

Advantages and disadvantages of GUID / UUID database keys

I've worked on a number of database systems in the past where moving entries between databases would have been made a lot easier if all the database keys had been GUID / UUID values. I've considered going down this path a few times, but there's always a bit of uncertainty, especially around performance and un-read-out-over-the-phone-able...

What is the best method of getting Int32 from first four bytes of GUID?

I'm just wondering if it exists better solution for this. BitConverter.ToInt32(sample_guid.ToByteArray(), 0) ...

GUID Behind the Scenes

I am wondering, what goes into the creation of a GUID. I don't mean what is used to create a GUID in a specific language (NewID() in SQL, new GUID() in C#), I mean when you call those methods/functions, what do they do to make the GUID? ...

Inserting a string of form "GUID1, GUID2, GUID3 ..." into an IN statement in TSQL

Hi, I've got a stored procedure in my database, that looks like this ALTER PROCEDURE [dbo].[GetCountingAnalysisResults] @RespondentFilters varchar AS BEGIN @RespondentFilters = '''8ec94bed-fed6-4627-8d45-21619331d82a, 114c61f2-8935-4755-b4e9-4a598a51cc7f''' DECLARE @SQL nvarchar(600) SET @SQL = 'SELECT * FROM Answer ...

C#: Test if string is a guid without throwing exceptions?

i want to try to convert a string to a Guid, but i don't want to rely on catching exceptions ( for performance reasons - exceptions are expensive for usability reasons - the debugger pops up for design reasons - the expected is not exceptional In other words the code: public static Boolean TryStrToGuid(String s, out Guid value) { ...

How to create a GUID / UUID in Javascript?

I'm trying to create globally-unique identifiers in Javascript. I'm not sure what routines are available on all browsers, how "random" and seeded the built-in random number generator is, etc.. The GUID / UUID should be at least 32 characters and should stay in the ASCII range to avoid trouble when passing them around. ...

Check for a valid guid

How can you check if a string is a valid GUID in vbscript? Has anyone written an IsGuid method? ...

Is the Hash of a GUID unique?

I create a GUID (as a string) and get the Hash of it. Can I consider this Hash to be unique? ...

How do you manipulate GUID's when doing Windows programming in C or C++?

How do you manipulate GUID's when doing Windows programming in C or C++? Thanks to Rich B for fixing my "faux pas" and moving my reply to my own question out of the question itself and into a standalone answer. ...

Cannot find the Create GUID tool in VS2005

I have Visual Studio 2005 Professional ENU installed and want to create GUIDs using its Create GUIDs utility. However, I cannot find it under the Tools menu. What should I do to get this utility? Thanks ...

GUIDs in a C++ Linux GCC app

I've got a bunch of servers running this Linux app. I'd like for them to be able to generate a GUID with a low probability of collision. I'm sure I could just pull 128 bytes out of /dev/urandom and that would probably be fine, but is there a simple & easy way to generate a GUID that is more equivalent to the Win32 one? Specifically, o...

How should I store a Guid in Oracle

I am coming from the SQL server world where we had uniqueidentifier. Is there an equivalent in oracle? This column will be frequently queried so performance is the key. I am generating the GUID in .Net and will be passing it to Oracle. For a couple reasons it cannot be generated by oracle so I cannot use sequence. ...

What are the performance improvement of Sequential Guid over standard Guid?

Has someone ever measured performance of Sequential Guid vs. Standard Guid when used as Primary Keys inside a database? ...

Generating a unique ID in PHP

I'm trying to generate a unique ID in php in order to store user-uploaded content on a FS without conflicts. I'm using php, and at the moment this little snippet is responsible for generating the UID: $id = tempnam (".", ""); unlink($id); $id = substr($id, 2); This code is hideous: it creates a temporary file on the FS and deletes it...

What's the purpose of sequental uniqueidentifier in PK of MS SQL?

I know that primary keys based on Guids do not have the best performance (due to the fragmentation), but they are globally unique and allow replication scenarios. Integral identifiers, on the other side, have greater performance at the cost of scalability. But in what scenarios would someone want to use sequential uniqueidentifier as t...

Are GUID collisions possible?

I'm working on a database that uses a GUID for each user that uses the app it's tied to. Somehow, two users ended up with the same GUID. I know that microsoft uses an algorithm to generate a random GUID that has an extremely low chance of causing collisons, but is a collision still possible? This is in SQL Server 2000 btw ...

Nullable GUID

In my database, in one of the table I have a GUID column with allow nulls. I have a method with a Guid? parameter that inserts a new data row in the table. However when I say myNewRow.myGuidColumn = myGuid I get the following error: "Cannot implicitly convert type 'System.Guid?' to 'System.Guid'." ...

What are the options for generating user friendly alpha numeric IDs (like business id, SKU)

Here are the requirements: Must be alphanumeric, 8-10 characters so that it is user friendly. These will be stored as unique keys in database. I am using Guids as primary keys so an option to use GUids to generate these unique Ids would be preferable. I am thinking on the lines of a base-n converter that takes a Guid and converts to an...