I am developing an Android application in which i am trying to integrate couchbase lite for storing customers information. Each customer information is in the form of a nested json so i decided to save it in documents. I have following queries related to couchbase lite implementation.
How a collection is created? I read collection (Table is SQL) a bucket in couchbase lite is not created and only databases are created, so if i want to store customers information in 1 bucket and products information in another do i need to create 2 database instances? and then store documents in it?
Hi, thanks for responding.
And what if i require not to save different categories documents in same COLLECTION (Couchbase lite instance ), For different categories i need to maintain different collections (Couchbase lite instances) as a requirement.
What will be the drawbacks then? Will it slow down the performance of app? Or will it slow down query processing or any other major drawback?
It would be helpful to understand the basis of that requirement. What’s the concern?
Having a separate instance of couchbase lite , each instance corresponding to a “table” in the relational world is not the right approach to modeling your data for a JSON store . I think its important to rethink your data model as it would apply to a NoSQL document store rather than retrofitting your relational style model. For instance, take advantage of nested objects and arrays in JSON - hopefully the link I shared provided guidance.
If you want specifics , here are few big ones - Queries are scoped to a database instance, you can’t do things like cross database joins