Mongo-DB Basic Commands

MongoDB is a new type of DBMS.In here things are little different.(More details)

It is non-relational (data not stored in a tabular format)
    • It has collections not tables
    • It has Documents not records
    • A document is a Jason object
So in mongo db  collection ( A table in sql database) is a set of json objects called documents. Database is a set of collections.

Here are some basic commands used to work with mongodb
  • Change the database or create and change
    • use [database name]
      Don't have to worry about the database created or not. just have to use a name if it is not created.
      >>db will return the name of the current database.
      Ex: use people
      People is the name of the database here