Reputation: 1797
My question is related to a design issue...
So I take as input from the user his couchbase URL, bucket name in which he wants to keep his doucments, Ramquota etc etc ...
But when he has multiple tables which he wants to replicate in Couchbase(used as caching layer on Oracle DB)... How should I represent table in it ... I mean buckets can't be equivalent to tables coz multiple buckets decrease performance. Also, for doc ID i use the primary key of the table the user is refering to, but then, even though there is a table name in the JSON which he can use in the view to query, if two tables have same ID's it would be a conflict ... So do I create primarykey + table name as the DOcumentID ... Or how do you represent tables in couchbase so that quering is easy for READS.
enter code here{"table": "gj2", "type": "insert", "id": "3", "name": "xyz"}
So here primary key for table gj2 is id which I also use as document ID in bucket "default" , and I can't create multiple buckets for each tables ... So if now a second table comes with same primary key value = "3" ... It won't add it.
Upvotes: 3
Views: 1413
Reputation: 16121
This topic is precisely covered by these recent Couchbase blog posts:
This first article covers how the data is stored into Couchbase at import time.
Upvotes: 4