MongoDB Tutorial

MongoDB is a document database. It stores data in a type of JSON format called BSON.

If you are unfamiliar with JSON, check out our JSON tutorial.

A record in MongoDB is a document, which is a data structure composed of key value pairs
similar to the structure of JSON objects.

A MongoDB Document

Records in a MongoDB database are called documents, and the field values may include numbers, strings,
booleans, arrays, or even nested documents.

Learning by Examples

Our "Show MongoDB" tool makes it easy to demonstrate MongoDB. It shows both the code and the result.

Learning by Exercises

My Learning

Track your progress with the free "My Learning" program here at W3Schools.

Log in to your account, and start earning points!

This is an optional feature. You can study at W3Schools without using My Learning.