let me give you a complete example:
suppose a table of personnel information including the following fields.
id, firstname, lastname, father_name and age.
when you insert data:
Jack, Smith, adam, 27
it will insert with an integer PK (like 987)
now if you accidentally insert those data again, it will insert another record with another PK (like 988) which is not desireable
now what I want is that I want to control generating primary keys based on the given data. I need a hash algorithm which gives numeric outputs as follows.
JackSmithadam27----->1025458218
JackSmithadam23----->1025498548
JackSmithadam27----->1025458218------->PK exist