I need to generate an id with the following features:
Id must be unique
Id consist of two parts 'type' and 'auto incremented' number
'type' is integer and value can be 1, 2 or 3
'auto incremented' number starts with 10001 and incremented each time id is generated.
type is selected from a web form and auto incremented number is from the database.
Example: if type is selected 2 and auto incremented number is 10001
then the generated id is = 210001
There may be hundrads of users generating id. Now my question is, Can this be done without stored procedure so that there is no id confict.
I am using ASP.Net(C#), Oracle, NHibernate