Hi,
I'm trying to decide whether I should use Guid.NewGuid() to generate an ID
or using database sequence. Is Guid.NewGuid() will return a unique number?
The MSDN said that the probability of duplication is low, but how low? Does
anyone know?
thanks,
/m 5 5179
Hi muscha,
Unbelievably low - in fact low enough to basically be ignored. It is hard to
comprehend how large 128 bit integers actually are.
HTH,
--
Greg Low (MVP)
MSDE Manager SQL Tools www.whitebearconsulting.com
"muscha" <mu****@no.spam .net> wrote in message
news:O$******** ******@TK2MSFTN GP09.phx.gbl... Hi,
I'm trying to decide whether I should use Guid.NewGuid() to generate an ID or using database sequence. Is Guid.NewGuid() will return a unique number? The MSDN said that the probability of duplication is low, but how low?
Does anyone know?
thanks,
/m
> Unbelievably low - in fact low enough to basically be ignored. It is hard
to comprehend how large 128 bit integers actually are.
So is this a good practice? To use Guid as my ID generator?
thanks,
/m HTH,
-- Greg Low (MVP) MSDE Manager SQL Tools www.whitebearconsulting.com
"muscha" <mu****@no.spam .net> wrote in message news:O$******** ******@TK2MSFTN GP09.phx.gbl... Hi,
I'm trying to decide whether I should use Guid.NewGuid() to generate an
ID or using database sequence. Is Guid.NewGuid() will return a unique
number? The MSDN said that the probability of duplication is low, but how low? Does anyone know?
thanks,
/m
I believe that duplications are not even possible, as long as you have a network card on the computer.
From what I understand, Guid's are generated based on the network card mac address as well as System ticks..
--------------
Robert Jeppesen
robert.jeppesen %at%durius-dot-se
"muscha" <mu****@no.spam .net> wrote in message news:O1******** ******@TK2MSFTN GP12.phx.gbl... Unbelievably low - in fact low enough to basically be ignored. It is hard to comprehend how large 128 bit integers actually are.
So is this a good practice? To use Guid as my ID generator?
thanks,
/m
HTH,
-- Greg Low (MVP) MSDE Manager SQL Tools www.whitebearconsulting.com
"muscha" <mu****@no.spam .net> wrote in message news:O$******** ******@TK2MSFTN GP09.phx.gbl... Hi,
I'm trying to decide whether I should use Guid.NewGuid() to generate an ID or using database sequence. Is Guid.NewGuid() will return a unique number? The MSDN said that the probability of duplication is low, but how low? Does anyone know?
thanks,
/m
"Robert Jeppesen" <robert.jeppese n(#)durius.se> wrote in message
news:uL******** ******@TK2MSFTN GP09.phx.gbl... I believe that duplications are not even possible, as long as you have a
network card on the computer. From what I understand, Guid's are generated based on the network card mac
address as well as System ticks..
So .. no two computer should ever generate the same Guid yes? I am working
in multiple box setup and the uniqueness of the Guid is critical. This is
why we are thinking of using database sequence for the guarantee.
thanks,
/m
-------------- Robert Jeppesen robert.jeppesen %at%durius-dot-se
"muscha" <mu****@no.spam .net> wrote in message
news:O1******** ******@TK2MSFTN GP12.phx.gbl... Unbelievably low - in fact low enough to basically be ignored. It is
hard to comprehend how large 128 bit integers actually are.
So is this a good practice? To use Guid as my ID generator?
thanks,
/m
HTH,
-- Greg Low (MVP) MSDE Manager SQL Tools www.whitebearconsulting.com
"muscha" <mu****@no.spam .net> wrote in message news:O$******** ******@TK2MSFTN GP09.phx.gbl... > Hi, > > I'm trying to decide whether I should use Guid.NewGuid() to generate
an ID > or using database sequence. Is Guid.NewGuid() will return a unique number? > The MSDN said that the probability of duplication is low, but how
low? Does > anyone know? > > thanks, > > /m > >
Globally Unique IDentifier says it all to me. Use GUIDs.
"muscha" <mu****@no.spam .net> wrote in message
news:eL******** ******@TK2MSFTN GP11.phx.gbl... "Robert Jeppesen" <robert.jeppese n(#)durius.se> wrote in message news:uL******** ******@TK2MSFTN GP09.phx.gbl... I believe that duplications are not even possible, as long as you have a network card on the computer. From what I understand, Guid's are generated based on the network card
mac address as well as System ticks..
So .. no two computer should ever generate the same Guid yes? I am working in multiple box setup and the uniqueness of the Guid is critical. This is why we are thinking of using database sequence for the guarantee.
thanks,
/m
-------------- Robert Jeppesen robert.jeppesen %at%durius-dot-se
"muscha" <mu****@no.spam .net> wrote in message news:O1******** ******@TK2MSFTN GP12.phx.gbl... > Unbelievably low - in fact low enough to basically be ignored. It is hard to > comprehend how large 128 bit integers actually are.
So is this a good practice? To use Guid as my ID generator?
thanks,
/m
> > HTH, > > > -- > Greg Low (MVP) > MSDE Manager SQL Tools > www.whitebearconsulting.com > > "muscha" <mu****@no.spam .net> wrote in message > news:O$******** ******@TK2MSFTN GP09.phx.gbl... > > Hi, > > > > I'm trying to decide whether I should use Guid.NewGuid() to
generate an ID > > or using database sequence. Is Guid.NewGuid() will return a unique number? > > The MSDN said that the probability of duplication is low, but how low? > Does > > anyone know? > > > > thanks, > > > > /m > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: BigDadyWeaver |
last post by:
I am using the following code in asp to define a unique and
unpredictable record ID in Access.
<%
'GENERATE UNIQUE ID
Function genguid()
Dim Guid
guid = server.createobject("scriptlet.typelib").guid
guid=Left(guid,instr(guid,"}"))
genguid=guid
|
by: Louis Frolio |
last post by:
Greetings All, I have read many upon many articles here regarding GUID
data types and uniqueness. There have been many opinions regarding
the effectiveness of GUID's and when they should/should not be used.
However, every article strongly implies, if it does not state it
outright, that GUID's are always unique. My question is this, what
happens if you have a database that uses GUID's and the NIC is changed
out on the box? From what I...
|
by: David Garamond |
last post by:
Are there any drawbacks of using BYTEA for PK compared to using a
primitive/atomic data types like INT/SERIAL? (like significant
performance hit, peculiar FK behaviour, etc).
I plan to use BYTEA for GUID (of course, temporarily I hope, until
PostgreSQL officially supports GUID data type), since it seems to be the
most convenient+compact compared to other data types currently
available. I use GUIDs for most PK columns.
--
|
by: Bernd Koehler |
last post by:
Hi:
I am a EE prof currently teaching an IT course.
One the assignments students recently completed was designing a small
MS Access Database.
I have two submissions that are remarkably similiar..<sigh> the
structure (number of tables, field names, table names) is virtually
identical. Some of the data in each table is different.
|
by: Jim Heavey |
last post by:
I have a DataTable in which one of the columns is a GUID. When I go to add
a new DataRow, how do I generate a GUID? I see that there is a datatype of
Guid, but it appears to me that I must define the guid value that I am
wanting. Is there some way to generate this automatically?
After I generate and place this value in the DataTable, should I use the
generated value or should I just let my database generate the Guid, as I
have my...
| |
by: John Grandy |
last post by:
Is it possible to generate a 20 byte integer from a GUID that is "unique
enough" ( just like a GUID is not truly unique , but is "unique enough" ).
We identify transactions with GUIDs , but a partner web service has a 20
byte limit on transaction ID passed.
|
by: Nils N |
last post by:
Hi all,
Does anyone have a best practice for performring querystring
authentication. I am now sending an email with a url to which the user
clicks to confirm his or her registration. The url contains a Guid in
the querystring, and this is validated agains the user's
uniqueidenfier in the sql server database. How secure is the
uniqueidentifer, and should I use a md5 encryption with a seed, or DES
encryption instead?
|
by: twang090 |
last post by:
Trying to create a 12 digit "guid", but have no idea on how to, anyone
please have any thought? Thanks in advance.
|
by: stjulian |
last post by:
IN IIS 6.0, classic .asp
I have been creating new GUID's through this block of code
set typ = server.createobject("Scriptlet.TypeLib")
guid = TRIM(MID(cstr(typ.GUID),2,36))
Response.Cookies("guid") = guid
Response.Cookies("guid").path = "/"
Response.Cookies("guid").expires = now() + 1
set typ = nothing
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |