The two main reasons for doing this are:
- Can assign an object an ID in your application layer and insert it into the database later. This allows batch inserts of objects without needing to run a SELECT query later to get the IDs.
- Can copy data across from one database to another without worrying about identifiers clashing. Thus there is no need to change them and worry about maintaining the foreign key relationships.
https://blog.programster.org/php-using-uuid-instead-of-auto-increment-or-sequence
The two main reasons for doing this are:
https://blog.programster.org/php-using-uuid-instead-of-auto-increment-or-sequence