in reply to Re^5: return primary key if duplicate entry exists?
in thread return primary key if duplicate entry exists?

After thinking a little bit. I think instead of the basic auto-increment key I will switch to using crc32. I realized this will make things easier as essentially the key is embedded in the data, and I will not need to do a SELECT..WHERE query.
  • Comment on Re^6: return primary key if duplicate entry exists?

Replies are listed 'Best First'.
Re^7: return primary key if duplicate entry exists?
by CountZero (Bishop) on Jan 24, 2016 at 20:06 UTC
    As I explain below, CRC32 is not a good candidate for a primary key. An auto-incrementing primary key is much better in this case.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics