samedi 30 mars 2019

Using a Randomly Selected Long as the Database Primary Key

Is it reasonable to use a randomly selected long integer as the primary key value when storing new rows in a database (i.e. PostgreSQL or SQL Server)?

I am doing some maintenance work on an existing code base and this is how the code currently works when new items are added. I brought this up with the main developer, they maintain that this "works well" and has "never caused a problem". Still, I have to say, it makes me uncomfortable and I am hoping for either a reason to leave the code the same or an excuse to switch to GUIDs.




Aucun commentaire:

Enregistrer un commentaire