these are non-automatic primary keys. right now i have a lookup table which stores table name,key name ,last key value and prefix string. i am retriving the record from this table , incrementing the primary key value by 1 and prefixing it with the prefix string stored in the table. then i use this value for inserting the record. Is there a better way to do this?