Book Image

Building Web Applications with Flask

By : Italo M Campelo Maia, Jack Stouffer, Gareth Dwyer, Italo Maia
Book Image

Building Web Applications with Flask

By: Italo M Campelo Maia, Jack Stouffer, Gareth Dwyer, Italo Maia

Overview of this book

Table of Contents (17 chapters)
Building Web Applications with Flask
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

MongoDB


MongoDB is a widely used, powerful NoSQL database. It allows you to store your data inside documents; a mutable, dictionary-like, object-like structure where your data may be stored without you worrying about things such as "is my data normalized to the third normal form?" or "do I have to create another table to store my relation?", and others.

MongoDB documents are actually BSON documents, a superset of JSON with extended data type support. If you know how to handle JSON documents, you should have no problem.

Tip

If JSON means nothing to you, just take a look at http://www.w3schools.com/json/.

Let's install MongoDB locally in order to try out some examples:

sudo apt-get install mongodb

Now, from console, type:

mongo

You'll enter the MongoDB interactive console. From it, you may execute commands, add documents to your database, query, update, or remove. Anything you can achieve grammatically, you may also achieve through the console. Now, let's understand the two important MongoDB concepts...