What is the correct way to split data in couchbase

I am thinking of working with couchbase for my next web application, and I wonder how my data should be structured, in particular the use of buckets. For example, if each user has a lot of unique data, should a separate bucket be created for each user (perhaps even for different categories of data)? I am also wondering if there are any real advantages / disadvantages for sharing data using buckets (other than the obvious organizational benefits) instead of just storing just one bucket.

+5
source share
1 answer

You will not get any benefit from using more or less buckets. The reason Couchbase has buckets is because it can be multi-user. The best use case I can use to use multiple buckets is a hosting provider, and you want different users to use the same database server. Buckets can be password protected and will prevent one user from accessing other user data.

Some people create several buckets for organizational purposes. Perhaps you are using two different applications and you want the data to be separate or, as you said, perhaps you want to separate the data into categories.

, , , , , , Couchbase, - (). .

+5

All Articles