Discussion Locked

Generating a unique user id

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

5 replies

by karen.wright

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

by jarrodb

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.

by epepke

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.

by karen.wright

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

by wrcotton

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.

This discussion is closed to new replies.