Using different types/format of _id ok?
I'm using one database for all (users, files and comments).
I was wondering if I can/should use
- twitter user id for user doc _id's
- md5 hash (of file) fo开发者_Go百科r file doc _id's
- provided uuid for comment doc _id's
It feels weird to mix those different types of id's.
What speaks agains this scenario? Should I stick to the CouchDB uuid's for consistency?
Use any format of id, or combination of formats, as you see fit. You might wish to add a prefix to ensure there are no overlaps between them, though.
twitter:@rnewson
md5:86f646c11b3bc7d434d06c077aee43d8
And so on.
精彩评论