I have used Guid's as a unique identifier in data applications. But in
a recent project, the length of the Guid's string is proving to be too
long. Is there a method for generating a unique string that is less
than the length of a Guid?
If I were to take the hash of a Guid string, what is the likelyhood
that two different Guids would have the same hash?
Can anyone offer any other suggestions?
Thanks 14 2690
"Chris Dunaway" <du******@gmail.com> schrieb: I have used Guid's as a unique identifier in data applications. But in a recent project, the length of the Guid's string is proving to be too long. Is there a method for generating a unique string that is less than the length of a Guid?
I am curious what the max. number of characters for the identifier in the
scenario you describe is...
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
At the moment, the length of the field is 30 characters, but the data
in it is in the following format (don't ask me why, I inherited this
code):
<custnum>-<uniqueid>-<city,state>
The entire string must be unique. The custnum, city, and state must
also be part of the string.
I can increase the size of the field, but I would then have to increase
the size of this same field in many other tables. I am hesitant to do
this unless I have to.
I was trying to determine a method to shorten the string.
Thanks
It's 8 bytes only - so I'm guessing if you aren't storing the GUID number,
but instead the actual decoded string, you will use up a tad more space ;)
"Chris Dunaway" <du******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... I have used Guid's as a unique identifier in data applications. But in a recent project, the length of the Guid's string is proving to be too long. Is there a method for generating a unique string that is less than the length of a Guid?
If I were to take the hash of a Guid string, what is the likelyhood that two different Guids would have the same hash?
Can anyone offer any other suggestions?
Thanks
"Chris Dunaway" <du******@gmail.com> schrieb: I have used Guid's as a unique identifier in data applications. But in a recent project, the length of the Guid's string is proving to be too long. Is there a method for generating a unique string that is less than the length of a Guid?
I am curious what the max. number of characters for the identifier in the
scenario you describe is...
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
At the moment, the length of the field is 30 characters, but the data
in it is in the following format (don't ask me why, I inherited this
code):
<custnum>-<uniqueid>-<city,state>
The entire string must be unique. The custnum, city, and state must
also be part of the string.
I can increase the size of the field, but I would then have to increase
the size of this same field in many other tables. I am hesitant to do
this unless I have to.
I was trying to determine a method to shorten the string.
Thanks
Robin, It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;)
Are you sure of this and in my opinion serialized it will be more. http://msdn.microsoft.com/library/de...classtopic.asp
Cor
It's 8 bytes only - so I'm guessing if you aren't storing the GUID number,
but instead the actual decoded string, you will use up a tad more space ;)
"Chris Dunaway" <du******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... I have used Guid's as a unique identifier in data applications. But in a recent project, the length of the Guid's string is proving to be too long. Is there a method for generating a unique string that is less than the length of a Guid?
If I were to take the hash of a Guid string, what is the likelyhood that two different Guids would have the same hash?
Can anyone offer any other suggestions?
Thanks
"Robin Tucker" <id*************************@reallyidont.com> schrieb: It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;)
GUIDs are 16 bytes...
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
My mistake, I didn't divide 128 bits by 8 correctly :/
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uF**************@TK2MSFTNGP14.phx.gbl... "Robin Tucker" <id*************************@reallyidont.com> schrieb: It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;)
GUIDs are 16 bytes...
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Yes, what I meant to say was that, a guid being 16 bytes (ehem, excuse my
math) might look like this:
ABACACABACACBACD (128 bits = 16 bytes = 16 ASCII chars)
but stored as a string it will be bigger, like this:
00000118-0000-0000-C000-000000000046 (36 characters)
"Cor Ligthert" <no************@planet.nl> wrote in message
news:Oi**************@TK2MSFTNGP15.phx.gbl... Robin,
It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;) Are you sure of this and in my opinion serialized it will be more.
http://msdn.microsoft.com/library/de...classtopic.asp
Cor
Robin, It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;)
Are you sure of this and in my opinion serialized it will be more. http://msdn.microsoft.com/library/de...classtopic.asp
Cor
"Robin Tucker" <id*************************@reallyidont.com> schrieb: It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;)
GUIDs are 16 bytes...
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
My mistake, I didn't divide 128 bits by 8 correctly :/
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uF**************@TK2MSFTNGP14.phx.gbl... "Robin Tucker" <id*************************@reallyidont.com> schrieb: It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;)
GUIDs are 16 bytes...
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Yes, what I meant to say was that, a guid being 16 bytes (ehem, excuse my
math) might look like this:
ABACACABACACBACD (128 bits = 16 bytes = 16 ASCII chars)
but stored as a string it will be bigger, like this:
00000118-0000-0000-C000-000000000046 (36 characters)
"Cor Ligthert" <no************@planet.nl> wrote in message
news:Oi**************@TK2MSFTNGP15.phx.gbl... Robin,
It's 8 bytes only - so I'm guessing if you aren't storing the GUID number, but instead the actual decoded string, you will use up a tad more space ;) Are you sure of this and in my opinion serialized it will be more.
http://msdn.microsoft.com/library/de...classtopic.asp
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mamuninfo |
last post by:
Hello,
Have any function in the DB2 database that can generate unique id
for each string like oracle, mysql,sybase,sqlserver database.
In mysql:-
select md5(concat_ws("Row name")) from...
|
by: J.Marsch |
last post by:
I notice that when I generate various guids, they appear to have a mix of
upper and lowercase letters.
Is the uniqueness of a guid case-sensitive?
In other words, if I generate a guid, and...
|
by: vector |
last post by:
I've got an application that generates GUIDs. A lot of GUIDs. Lots
of GUIDs that end up in files on disk, taking up space. I'd like to
continue using the Guid.NewGuid() function as my unique tag...
|
by: EP |
last post by:
This inquiry may either turn out to be about the suitability of the
SHA-1 (160 bit digest) for file identification, the sha function in
Python ... or about some error in my script. Any insight...
|
by: A. Farber |
last post by:
Hello,
I'm programming a web game on OpenBSD, but am
also trying to keep in runnable on Linux and Cygwin.
I have a list of tables at which a player/kibitzer can
sit down or create a new empty...
|
by: JT |
last post by:
Hi,
I am having trouble finding information about GUIDs and strong-names
and don't really know what I need. If that's too ambiguous, please
tell me where to look for info on these.
Here's...
|
by: howa |
last post by:
For example, if two hosts arrive a server at the same time
(microtime), and using the same IP via NAT, and may be even lucky
enough to have the same random number
How PHP make them to use...
|
by: Matija Papec |
last post by:
I would like to be able to convert any reference (function, object, or
array) into unique string id and retrieve original reference afterwards
using same id.
The following code does this but...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| | |