General discussion

Locked

Generating a unique user id

By karen.wright ·
Does anyone know whether there is a generally accepted method of generating a unique userid? The scenario is a database holding info on people with names and addresses. For example I have tried concatenating first 2 initials, surname and postcode and although it has given unique values its very unwieldly and it won't be very useful for people without a postcode. Otherwise I could try initials conactenated with surname and then generate a number for the dups eg. JSmith01, JSmith02 etc. Is this the more usual method? Any info or directions to source material welcome.
Thanks
Karen

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

I should have added

by karen.wright In reply to Generating a unique user ...

The users will need to remember their userid so just generating a number won't do. It should show some resemblence to their name.
Thanks

Collapse -

Here's some idea's

by jarrodb In reply to I should have added

Do some tests and try a few different cobimnations of these to see how many duplicates you get. (Most of which users
should be able to remember).

postcode
phonenumber
date of birth
initials
email address
Street / Unit Number

I think anycombination will yeild duplicates at some point so you may want to start with your idea of concatenating a sequential number. I would do it from the start though ie. all users have -0001 concatentated, that way you don't have to try and retro-fit anything later and disrupt users, business procedures, programs etc...


cheers.

Collapse -

What we do

by epepke In reply to Generating a unique user ...

I don't know of a standard, but what we do is first initial followed by last name. It seems to work pretty well. In the rare instances where it doesn't work, we make up a new one.

We only have about 2500 users, though, so if you have more, you may have more collissions.

Collapse -

Thanks but we have ~20,000 users

by karen.wright In reply to What we do

Yes I tried this but I got alot of duplicates. I think I'll have to find some way of appending a number 01,02 etc to the initial and surname.
Thanks

Collapse -

Register Users?

by WRCotton In reply to Generating a unique user ...

Do you require the users to register in order to gain access? Most web sites handle this by having a new user enter their desired user id. If it's already in the system, tell them so and have them enter a different id.

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums