in mysql, UUID can be used as the logical primary key, and the physical primary key still uses the self-increasing ID
1. UUID definition
UUID means Universally Unique Identifier, which is a standard of software construction. It is also a part of distributed computing environment (DCE) applied by the organization of the Open Software Foundation, OSF). UUID refers to a number generated on a machine, which is guaranteed to be unique to all machines in the same time and space.
2. Advantages of UUID
1) It can ensure independence, and the program can be migrated between different databases, and the effect will not be affected.
2) Make sure that the generated ID is not only table independent, but also library independent, which is especially important when you want to partition the database.
3) There will be no problems due to the discontinuous sequence of tables during data migration in oracle
3. Disadvantages of UUID
1) It takes up a lot of space, and it takes more space to store a UUID than an INT type.
2) After using UUID, the URL is long and unfriendly.