Join Joseph LeBlanc for an in-depth discussion in this video Nesting document data, part of Up and Running with NoSQL Databases.
- View Offline
Flat fields are just one of the many options you have for storing data in CouchDB. …Arrays and objects allow you to nest data within documents. …Right now, we have the Futon interface loaded with the restaurant database in place. …So let's navigate to restaurant. …We already have a couple of documents ready to go. …Click on the one with the second revision. …Here we have the document with the hours. …Let's say we want to add the hours as an object where we can more readily access that data …in a structured format.…
Let's go to the exercise files to paste that in. …Copy this object, and then create a new field for it by clicking Add Field. …I'm going to call this field Hours, and now I am going to paste that data into this field, …and then click the green check. …You'll notice now we have each day of the week bolded, and the value is in quotes.…
If we click over to the source, you'll see that hours is structured within this document. …One thing that's very important to remember is that the JSON format is very strictly adhered to. …
- What is NoSQL?
- Installing CouchDB on Mac, Windows, and Linux
- Storing data
- Nesting document data
- Specifying search criteria
- Reducing data
- Attaching and retrieving images
- Deploying applications
- Securing CouchDB
- Understanding the CAP theorem