Reference: http://www.cnblogs.com/lzrabbit/p/3682510.html
Reference: http://blog.csdn.net/qqiabc521/article/details/6325203
1) MongoDB installation as a Windows service
After downloading and extracting the website
Mongod--dbpath D:\MongoDB\data--installmongod--dbpath D:\MongoDB\data--logpath=d:\mongodb\logs\mongodb.log-- LOGAPPENDSC Create MongoDB binpath= "D:\MongoDB\bin\mongod.exe--service--dbpath D:\MongoDB\data--logpath=d:\mongodb \logs\mongodb.log--logappend "net start MongoDB
2) MongoDB Basic syntax
Switch database
Use test
Insert
Db.person.insert ({"Name": "Funky", "Age": 30})
Update
Db.collection.update (criteria, objnew, Upsert, Multi) db.person.update ({"Name": "Funky"},{"name": "Funky", "Age": 30}) Replace Db.person.update completely ({"name": "Funky"},{$set: {"Pass": "Mypass"}},false,true)//All updates, not inserted
Delete
Db.person.remove ({"Name": "Funky"})
The installation and basic grammar of MongoDB learning