> On Jun 15, 2015, at 9:25 AM, atom992 <[email protected]> wrote: > > I am thinking about how long should I design the length of document IDs. As > we know,All document meta‐ data, including the document ID, is stored in > memory at all times
That’s not true; where did you read that? > but too short IDs might not be sure unique. so for the best practice, how > long should I design the length of doc IDs. It depends on your needs. If you don’t care what the docID looks like but it has to be unique, just use Database.createDocument, which will generate a random UUID. If you do care about the docID, you can come up with unique ones that are a lot shorter. For example, if you need a unique ID for a user’s profile document, just use “profile:”+username. If you need a document for a particular product in your inventory, just use its SKU or UPC number. —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/28FE7E48-B37A-41D7-9B78-2799D9AD7B72%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
