Basics of MongoDB
This MongoDB Cheatsheet is my best friend.
MongoDB Concepts
- Documents
- Collections: just like tables in SQL.
- Database
MongoShell
Some examples:
// show the databases
show dbs
// show collections
show collections
//set any database to current database
use database_name
// insert entry
db.database_name.insert( an_object_2_be_the_entry )
// read document
db.database_name.findOne({'some_field':'value_of_field'})
db.database_name.fidn()
// prettify
db.database_name.find().pretty()
Planted:
by L Ma;
References:
Dynamic Backlinks to
wiki/computation/basics-of-mongodb
:wiki/computation/basics-of-mongodb
Links to:L Ma (2018). 'Basics of MongoDB', Datumorphism, 10 April. Available at: https://datumorphism.leima.is/wiki/computation/basics-of-mongodb/.