Hi everyone,
I’m fairly new to Couchbase, and I have a little problem I was trying to solve in Cassandra (before I met Couchbase ). Please find the details here: http://stackoverflow.com/questions/13603906/cassandra-recommended-approach-to-storing-user-display-name-on-the-post-and-w
Thank you so much!
Hello,
This is a very generic question about Datamodel design and it depends a log of your application and its logic (and also how often a specific operation/actions will occur)
You can find some generic information about Datamodel design with Couchbase (in fact for JSON oriented database):
- http://www.couchbase.com/docs/couchbase-devguide-2.0/modeling-documents…
-
http://couchbasemodels.com/
In you specific case, if you know that you will have to change a value ‘often’, that is present in many ‘documents’ the easiest/best approach will probably be to store the information in another document and use a reference in the other one. ( http://www.couchbase.com/docs/couchbase-devguide-2.0/reference-docs-and-… )
{
“type”: “user”,
“id”: “u:001”,
“name” : “John Doe”,
“tel” : “654 555 5555”
}
that is referenced in the main document using the following document:
{
“type”: “main”,
“user”:“u:001”,
…
…
}
Regards
Tug