Having read most of the couchbase docs/white-papers I have still some basic questions on document/bucket design:
- Storing timestamp/date values, which format do you recommend.
On the linux server I would define GMT timezone and display the date/time value according to the user’s defined timezone.
I’m using java as a client so I would use a java.util.Date to store the value according to the user’s timezone.
Because nosql is all about performance, should I store the timestamp (with milliseconds) as a long value or in a human readable value or maybe BOTH, using the long value for indexing/sorting and the human readable value when accessing the document from the console.
- Designing document for multi-lingual sites
In a RDBMS, I would create one database, create separate tables for labels with a language key:
2.a. Entity with a lot of ids and many attributes, eg products:
- external table for the language dependent attributes
Product labels Table
PK: productId, languageId
2.b. Entity with few ids and few attributes, eg countries:
- all in one table
PK: countryId + languageId
In couchbase I could:
- create one bucket/database for language independent data
1 document per product
- create one bucket/database per language, language key is part of bucket name
In this last bucket:
1 document per product in that language (info changed by many users)
1 document for all countries in that language (table managed by site admins => few users => no concurrency problems)
With this set-up I would need 2 separate client connections, 1 for each bucket to retrieve a product and the language dependent data.
Couchbase having integrated CouchDb, can I use CouchDb best practices found on the net?
Please add a full-text search on the forums.
Before writing to a couchbase forum I would like to check if any similar question with answer exists before writing a new post
Your help will be appreciated