An argument against defaulting to auto-increment primary keys

Shannon Griswold Databases, Java 11 Comments

The de-facto “easy” primary key for ages has been the auto-incrementing integer. Upon insertion of a new record, the database simply increments a counter for the table and uses the new value for the primary key of the inserted row. It’s simple to setup, requires no maintenance, and guarantees a predictable key. For my own purposes, I was under the …