The “easy” primary key for ages has been the auto-incrementing integer. In my Android App, I immediately, without even thinking about it, constructed all of my Entities using auto-generated Long IDs. Then a user requested a new feature: using the Android without a data connection. After significant research and some experiments on how to make this work, I landed on one of the most underrated features of modern programming languages: the Universally Unique Identifier (UUID).
↧
An argument against defaulting to auto-increment primary keys
↧