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

Map with related documents?

1 reply [Last post]
  • Login or register to post comments
Wed, 04/04/2012 - 09:00
drakmir
Offline
Joined: 01/07/2012
Groups: None

Is it possible to build a map routine that fundamentally does a join?

For instance, if I have 2 objects, call them User and Game. User has "user_id" and "display_name" in it. Game has a "created_by_userid" in it. Can I get a document from a view that shows a subset of the data in Game (simple to do) PLUS the display name of the user that created it, or do I have to do 2 separate gets to do this?

Top
  • Login or register to post comments
Fri, 04/20/2012 - 13:20
BigBlueHat
Offline
Joined: 01/28/2011
Groups: None

drakmir,

If you're using the memcached protocol along with the Couchbase Server Views system, you can use a "getMulti" request to retrieve all the user documents referenced in your View results by their ID in the second request done via memcached.

What SDK are you using? I'd be happy to give you more specifics from there.

Let me know if you have more questions about this approach,
Benjamin

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