Database holds the collections
Collection holds the documents
Document is JSON formatted key/value pairs
download and extract to your fav location
set ENV variable, export PATH=”~/Documents/Tools/mongodb/bin:$PATH”
Create a data directory under ~/data/db (default is /data/db, need to do sudo)
then start, “mongod –dbpath ~/data/db”
Create a new DB,
all: “show dbs”
insert() will insert the document in myCollection.
save() will insert or update the document in myCollection based on _id field.
If myCollection doesn’t exists it will be created on first insert.
db.myCollection.find() will return all the available docs of myCollection.
can use field and logics in the find() functon.