Introduction Flashcards
show dbs
show databases were created
cls
cleaer the shell
use <database></database>
switch to database with name <database> and if this database was not exist create one</database>
db.collectionName.insertOne({ “name”: “ivan”, age: 26})
create a collection with name collectionName and insert one document in it with a unique id. this id created by mongodb automatically. qoutes around keys are not neccessary
db.collectionName.find()
returns the documents inside the collection with name collectionName
db.collectionName.find().pretty()
returns the documents inside the collection with name collectionName in a pretty represntation
mongo drivers
if you want to use mongo inside your app that written in
a programming language such as javascript you should use
drivers and to know how to use it read documents there in
mongodb site
storage engine