The beer sample data demonstrates a combination of the document structure used to describe different items, including references between objects, and also includes a number of sample views that show the view structure and layout.
The primary document type is the 'beer' document:
{ "name": "Piranha Pale Ale", "abv": 5.7, "ibu": 0, "srm": 0, "upc": 0, "type": "beer", "brewery_id": "110f04166d", "updated": "2010-07-22 20:00:20", "description": "", "style": "American-Style Pale Ale", "category": "North American Ale" }
Beer documents contain core information about different beers,
including the name, alcohol by volume (abv) and
categorisation data.
Individual beer documents are related to brewery documents using
the brewery_id field, which holds the
information about a specific brewery for the beer:
{ "name": "Commonwealth Brewing #1", "city": "Boston", "state": "Massachusetts", "code": "", "country": "United States", "phone": "", "website": "", "type": "brewery", "updated": "2010-07-22 20:00:20", "description": "", "address": [ ], "geo": { "accuracy": "APPROXIMATE", "lat": 42.3584, "lng": -71.0598 } }
The brewery reconrd includes basic contact and address information for the brewery, and contains a spatial record consisting of the latitute and longitude of the brewery location.
To demonstrate the view functionality in Couchbase Server, three views are defined.