I am now thinking I will retain the info in the same document (documentA), but 
create a second document (documentB) sort of like a detail record in a 
relational database. This detail record would contain all the non-critical info 
that rarely changes. There would be a one-to-one mapping between documentA docs 
and documentB docs.

How would I join the documents on the client (phone)? Is it OK to query 
Couchbase Lite for all the documentB docs, iterate through each of them 
querying Couchbase Lite using doc ID of documentA (stored in documentB)? I have 
1400+ documents so this would result in 1400 queries!

I guess a better approach might be to query Couchbase Lite for all the 
documentB docs, then run another query for all the documentA docs whose 
key-value output is the doc ID and the actual document. Then iterate through 
each documentB doc and using the doc ID of documentA immediately pinpoint the 
documentA doc in the results of the second query.

-- 
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/20c6677c-5047-4b1e-b669-f0dd082031ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to