Storing data in MongoDB
MongoDB, by the company with the same name (http://www.mongodb.org/), is the most popular database among the NoSQL databases. Let's look at some facts about MongoDB:
- MongoDB is an open source, distributed, document-oriented database; each data record is actually a document.
- A table is called a collection in MongoDB. Documents are stored in a JSON-like format called BSON.
- The most advanced driver from Dart to MongoDB is the pub package
mongo_dart
by Vadim Tsushko, Ted Sander, and Paul Evans. This recipe will show you how to create, read, update, and delete actions in a MongoDB database from a Dart app. You can see it in action in theusing_mongodb
project.
Getting ready
Install the latest production release for your system from http://www.mongodb.org/downloads. This is easy. However, if you need more details, refer to http://docs.mongodb.org/manual/installation/. Start the mongod
server process (for example, from c:\mongodb\bin
on Windows) before the Dart app. To...