|
|
|
|
|
by AdieuToLogic
3382 days ago
|
|
URN's[0] can support resource categorization so long as the Namespace Identifier (NID) does not collide with the reserved ones (and I'd throw in those which are well-known in the industry as well). So, for example, a URN which uses UUID's to satisfy uniqueness yet still allows for categorization could look like: urn:some-company:resource-type:abcdef012-3456-...
For complete technical conformance, the "some-company" NID would need to be requested/registered from the IETF.In practice, my opinion is that the registration step is largely not required if the URN's are used strictly as an implementation detail within a system. However, those publicized and/or having a reasonable chance of being persisted by an external actor should have a sufficiently unique NID such that it can be registered and, more importantly, does not have a coincidental collision with other systems generating URN's. 0 - https://tools.ietf.org/html/rfc2648 |
|
Probably worth having a autoincrementing ID on tables using uuids as well, though. Not 100% sure on that, but I've definitely hit batch jobs that need to run / frameworks that require autoincrementing integer IDs, and getting stuck is a pain. (Adding an autoincrementing key after the fact is doable, but at least on postgres involves a rewrite the the entire table, so you kill the heck out of replication)