guid

Generate a GUID in Oracle

Is it possible to auto-generate a GUID into an Insert statement? Also, what type of field should I use to store this GUID? Thanks! ...

UUID collision risk using different algorithms

Hi Guys, I have a database where 2 (or maybe 3 or 4) different applications are inserting information. The new information has IDs of the type GUID/UUID, but each application is using a different algorithm to generate the IDs. For example, one is using the NHibernate's "guid.comb", other is using the SQLServer's NEWID(), other might want...

Searching table by Guid faster when the Guid is the clustered index?

If I am going to be querying a table by Guids (irregardless of fragmentation problems with Guids), would it be faster to have the Guid as the clustered index rather than the non-clustered index or no index at all? This question is coming from a read-only standpoint. I'm just curious if there will be a speed improvement between the searc...

How to update guid ID references when converting to identity IDs

I am trying to convert tables from using guid primary keys / clustered indexes to using int identities. This is for SQL Server 2005. There are two tables MainTable and RelatedTable, and the current table structure is as follows: MainTable [40 million rows] IDGuid - uniqueidentifier - PK -- [data columns] RelatedTable [400 million row...

What are the chances of getting the same GUID in 1 billion iterations?

I am working on a project where I need to generate approximately 1 billion GUIDs. I know GUIDs are not guaranteed to be unique but are unique almost all of the time. If I generated a billion GUIDs, what is the probability that there will be a match? ...

Search uniqueidentifier value in SQL Server 2008 table

I have a table in SQL Server 2008 with uniqueidentifier field. In my application (C#, WPF) I have a textbox which intended for search some data by GUID, user can enter guid by typing, ctrl+v, etc, so he/she can make an error. What is the best and fastest approach to make a search by this field using linq2sql ignoring whitespaces, "-".....

Generating GUID

I am thinking to use a GUID in my .net app which uses SQL Server. Should I be writing a stored procedure which generates the GUID on each record entered or should I be directly generating it from the application. Reasons for asking the question (If am wrong correct me in this): I (as/pre)sume: When generating the GUID from the databas...

NULL Guid in Soap/xml call

I am developing applications that communicate to a web service to access a database. One of the web service calls returns data held by a node in a tree structure by taking either the GUID of the node, or NULL to return the root node. Adding a web service reference to a managed project easily allows null to be sent as a parameter, but ...

What are the tradeoffs when generating unique sequence numbers in a distributed and concurrent environment?

I am curious about the contraints and tradeoffs for generating unique sequence numbers in a distributed and concurrent environment. Imagine this: I have a system where all it does is give back an unique sequence number every time you ask it. Here is an ideal spec for such a system (constraints): Stay up under high-load. Allow as many...

What is the difference between a "nonce" and a "GUID"?

This question here is about creating an authentication scheme. The accepted answer given by AviD states Your use of a cryptographic nonce is also important, that many tend to skip over - e.g. "lets just use a GUID"... Which leads me to my question. Why wouldn't you just use a GUID? ...

How do I pull a GUID from my database in order to Update a Username

I have a SQL database that is different than the one in ASP.net so I had to create a custom membership Provider. The provider to get the user looks like this: My SQL class name is CustomSqlProvider: Public Overrides Function GetUser(ByVal username As String, _ ByVal userIsOnline As Boolean) As MembershipUser 'Dim connectionStrin...

how are GUIDs generated in SQL Server?

How are GUIDs generated in SQL Server? I understand that I should use newid(), but what is the algorithm that function uses? Is it a hash of the time/date? ...

would there be any reason to hash a GUID?

would there be any reason to hash a GUID? ...

GUID, 30 character random string

I need to generate a unique string that is 30 characters in length. At first, I was going to generate a GUID and just remove the first two characters. Guid.NewGuid().ToString("N").Substring(2); Will removing the two first characters have a significant effect on the "uniqueness"? Is it something that I should be worried about? Is th...

guid problem with asp.net using c#

In Microsoft Visual Web Developer 2005 Express Edition, I can't find the type System.Guid. Is there problem with my version or do I have another problem? System.Guid is not recognized in IntelliSense. ...

How are uniqueidentifiers calculated?

I was curious as to how SQL Server calculates uniqueidentifiers. I understand that uniqueidentifiers, are GUIDs but are these calculated based on system time? Or are they calculated based on the name of job/script that has called the NEWID() function. I found this but i found this reference to be unclear. ...

GUID as uniq key with SQLite

I found GUID generation routine with python. Running the code gives me the following results. GUID: 00000129e0e72d9b2aab3c1500ac001000e90001 Time: Sat, 17 Jul 2010 09:55:33 (millis: 0.787) IP: 172.16.233.1 Counter: 715865109 The comments of this code has the following message. ### GUIDs make wonderful databas...

Should NHibernate generate SQL for GUID parameter without quotes?

Sql Server 2008 R2 Express. NHibernate 2.1.2.4. I get SQL like: SELECT customer0_.Id as Id1_0_ FROM customers customer0_ WHERE customer0_.Id=@p0; @p0 = 11111111-1111-1111-1111-111111111111 ...which returns 0 records even though there is Customer in there with that Id. The SQL Server column datatype is UNIQUEIDENTIFIER. <session-f...

How does performance of guids compare to strings in sql

For primary keys on a large SQL Server 2008 data table, I have the choice of using guids or a string of about the same size. Performance-wise, how does a guid (16 bytes) compare to a string of about 16 chars, when doing joins, selects, etc. Is SQL better at handling guids because internally they are represented as a number? ...

Create a Guid from an int

Given an int, how can you create the same Guid repeatedly? Edit: I'm integrating two systems, one uses ints as a primary key, the other recognises an object by it's Guid. Because of this, I need to be able to recreate the same Guid for a given int so that the second system can recognise the entities coming from the first. ...