Book Image

Learning Node.js for Mobile Application Development

Book Image

Learning Node.js for Mobile Application Development

Overview of this book

Table of Contents (21 chapters)
Learning Node.js for Mobile Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
14
Creating an E-Commerce Application Using the Ionic Framework
Index

An introduction to MongoDB


Let's start with a short but informative tour of MongoDB, which will give you the essential knowledge that you need in order to effectively work with it.

First, let's get a good grasp of how data is organized in a MongoDB instance. This will give us the foundation that is required to understand how storage and retrieval operations work later on.

Documents

MongoDB is a NoSQL Database Management System (DBMS). This means that it eschews the traditional table-based data storage model used by SQL-oriented systems such as MySQL, Oracle, and Microsoft SQL Server. Instead, it stores data as documents, which are data structures that are almost identical to standard JSON objects. For example, a MongoDB document can look like this:

{
  "_id" : ObjectId("547cb6f109ce675dbffe0da5"),
  "name" : "Fleur-De-Lys Pharmacy",
  "licenseNumber" : "DL 133",
  "address" : "430, Triq Fleur-de-Lys",
  "geolocation" : {
  "lat" : 35.8938857,
  "lng" : 14.46954679999999
  },
  "postCode" : ...