|
| ▲ | Lvl999Noob 5 days ago | parent | next [-] |
| Never use someone else's synthetic key as your primary key. If you want ordered keys, even if the API is giving out sequential integers, you should still use your own sequential IDs. |
|
| ▲ | avemg 5 days ago | parent | prev | next [-] |
| I take your point, but I think your hypothetical is a wonderful example of Hyrum's Law. And for that reason, if I was going to go to the trouble of mapping my internal v7 uuids into something more random for public consumption, then I'd be sure generate something that doesn't look like a uuid at all so nobody gets any funny ideas about what they can do with it. |
|
| ▲ | tart-lemonade 5 days ago | parent | prev [-] |
| Just to clarify, do you mean that UUIDv4 in general is worse, or just this 7->4 obfuscation? |
| |
| ▲ | the_mitsuhiko 5 days ago | parent [-] | | I'm not saying anything about better or worse. I'm saying that UUID v4 by definition has high entropy and UUID v7 does not. You can always go from low to high entropy, but not the other way around. |
|