AddThis Social Bookmark Button
  1. Show all the database available in the mongo
    show databases
  2. Choose a database in the mongo shell
    use [name_of_database]
  3. Show all the collections available on the current / chosen database
    show collections
  4. Import given json into your database using mongoimport 
    mongoimport -d [database_name] -c [collection_name] < data.json
  5. Starting mongoDB on a different port number
    mongod --port
  6. Starting mongoDB to an given directory for datafiles
    mongod --dbpath e:\mynewdbpath
  7. Restoring a bson document into your db
    mongorestore --db [name_of_your_db] [path_where_bson_is_located]

 

AddThis Social Bookmark Button

A list of frequently asked mongodb interview questions meant for MongoDB developers.

Subcategories

Study notes for MongoDB Developer Certification exams, with this set of notes helps you gain confidence

AddThis Social Bookmark Button

We will learn a great deal on mongodb by exploring crud operations, understand how a schema in mongodb is different from relational databases