February 2015
Intermediate to advanced
170 pages
3h 39m
English
N1QL does contain support to perform joins on documents with a caveat—the joins must be made across different buckets. While this is a limitation for several use cases, it does provide a means of putting data together from disparate document sources.
Since this chapter focuses on the beer-sample database, the following join next imagines a setup where beer and brewery documents are stored in two separate buckets named beers and breweries, respectively:
SELECT * FROM beers AS b JOIN breweries AS b2 KEYS b.brewery_id
Read now
Unlock full access