[Gllug] Unique id fields

Jason Clifford jason at ukpost.com
Sat Oct 11 18:57:05 UTC 2003


On 11 Oct 2003, will wrote:

> > You need to consider the application and the extent to which you need the 
> > ID number to be unique - within the application? on just one server or 
> > across a farm?
> 
> Yes, unique within the application, duplicate ID's would be a pain in
> the arse, and more importantly, a security risk.

How will you be storing the data locally to verify the id?

I currently use MySQL in on application making use of it's auto-increment 
feature on a field in the table to ID the transaction. It's pretty much 
always guaranteed to be unique and I can tie in certain other data from 
the visitor (IP, client ID, etc) to ensure it's the same connection when 
each request comes in.

In another app, I am using a combination of now() and rand() to generate a 
fairly unique number (not suitable for situations that require an 
absolutely unique number).

Jason Clifford
-- 
UKFSN.ORG		Finance Free Software while you surf the 'net
http://www.ukfsn.org/		ADSL Broadband available now


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list