Universally Unique IDs (UUIDs) use random numbers to create unique IDs. UUIDs use more storage, but they provide a good solution for distributed databases and security.
Changing the schema for large relational databases costs companies millions of dollars every year. Relational databases are highly intertwined, so one small change can have unexpected, cascading effects.
The foundation for a table in a relational database is the primary key. Because of its importance, we have to give special consideration to how we select our primary keys.
In this article I’ll discuss why primary keys are important, different types of keys you can use, and a primary key with values that are guaranteed to have never, ever been used in the entire universe (with a 1/10^37 chance of error).
uuid-osp
- PostgreSQL Example#postgresql #sql #developer