I am looking to develop a system in which i need to assign every user a unique pin code for security. The user will only enter this pin code as a means of identifying himself. T
It seems you want to use the pin code as the sole means of identification for users. A workable solution would be to use the first five digits to identify the user, and append four digits as a PIN code.
If you don't want to store PINs they can be computed by applying a cryptographically secure hash (SHA1 or better) to the user number plus a system-wide secret code.