Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Arland Smith   on Mar 14 In Java Category.

  
Question Answered By: Perdita Lopez   on Mar 14

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

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on RDB design, Avoiding Duplicate Records Or get search suggestion and latest updates.


Tagged: