MongoDB is document based database.
Creating Database NodeJS - MongoDB
Once mongoDB is up and running,
var mongoDB = require('mongodb');
var mydbserver = new mongodb.server('localhost', 27017, {auto_reconnect:true});
/* new mongodb.Db() creates a new database */
/* w:1 sets the write concern */
var database = new mongodb.Db('eCommerceDb',mydbserver, {w:1});
Collections :
Relational databases uses tables to store data. MongoDB stores data as document format uses collection. It is NoSql type database.
Collections are represented as JSON format.