MongoDB - Terminology



Below given table shows the SQL terminology and concepts and its corresponding MongoDB terminology and concepts.

RDBMS Concept MongoDB Concept
Database Database
Table Collection
Tuple/Row Document
column Field
Table Join Embedded Documents
Primary Key Primary Key (Default key _id provided by mongodb itself)
Database Server and Client
Mysqld/Oracle mongod
mysql/sqlplus mongo

Getting Familiar with MongoDB console

  • Start MongoDB Server: To start mongodb server simply type C:\mongodb\bin>mongod.exe in command prompt. Please note if your data folder is different then use D:\set up\mongodb\bin>mongod.exe --dbpath "d:\set up\mongodb\data" command.

  • Start MongoDB Client: Type C:\mongodb\bin>mongo.exe in command prompt.

  • MongoDB Help: Type db.help() in mongo client. This will show the list of commands that can be used in mongodb.

DB Help
  • MongoDB Statistics: Type db.stats() in mongo client. This will show the database name, cumber of collection and documents in the database. Also display the storage size, indexes, index size and many other attributes.

DB Stats
Advertisements