Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

Recommended approach to storing user display name on the post

1 reply [Last post]
  • Login or register to post comments
Wed, 12/12/2012 - 06:23
sithembiso
Offline
Joined: 12/12/2012
Groups: None

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!

Top
  • Login or register to post comments
Thu, 12/13/2012 - 06:24
tgrall
Offline
Joined: 09/05/2012
Groups: None

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

__________________

Tug
@tgrall

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker