Hi, Am Fr., 10. Juli 2020 um 14:03 Uhr schrieb Olaf Krüger <[email protected]>:
> However, before going this way I would like to know if there are any > drawbacks with such approach and how others achieve this. > Or should we rather rely on the auto-UUID and move custom ids into its own > document property, something like e.g. "publicId"? Since the document id is the only way to enforce uniqueness, if our data has a "natural" id, like a serial number we use that as the document id (with a pre / postfix). If the data doesn't have a "natural" id, we generate an uuid, still with a pre/postfix and use this. You might want to read about partitioned databases¹ and see if you might consider using those in the foreseeable future to plan your document id generation according to those requirements. regards, Stefan [1] https://docs.couchdb.org/en/stable/partitioned-dbs/index.html
