O'Reilly logo

CoffeeScript Application Development Cookbook by Mike Hatfield

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with MongoDB

MongoDB is a no-SQL document database. Instead of saving data as rows within tables with a fixed column structure, a document database offers much more flexibility allowing you to simply store objects, retrieve, update, and delete complex objects.

For example, you might have customer orders, invoices, and payments. In a relational SQL-based database, this data would likely be spread across four or more tables: Customers, Orders, Invoices, Payments, and several other master tables (Addresses, Cities, Order Details, Products, and so on). To determine whether a customer's account has been paid in full, we need to query the data across a number of tables.

In MongoDB, we can store a customer as a document. This document could contain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required