# # #安装
1. Install (Windows): Unzip to install directory C:\mongodb, create folder C:\mongodb\data\db, C:\mongodb\data\log, create file c:\mongodb\data\log\ MongoDB.log
2. Start-Up service: CD C:\mongodb\bin; Mongod-dbpath "C:\mongodb\data\db"
3. Test Connection: C:\mongodb\bin\mongo
# # #常用命令
Show DBS//Show Database list
Use dbname//Enter dbname database, no then create
DB//view current database name
Exit//Sign Out
Show Collections//Display the collection in the Database (table)
Db.dropdatabase ()//delete current database
Db.mytable.drop (); Delete Table MyTable
Db.mytab.save ({"Name": "AAA"})//CREATE table Mytab and add a record
Db.mytab.insert ({"Name": "BBB", "Age": 10})//Insert Record
Db.mytab.remove ({"Name": "AAA"})//delete record
Db.mytab.find ()//Find all records
Db.mytab.findOne ()//Find first record
Db.mytab.update ({"Name": "AAA"},{"name": "CCC", "Age": 22}); Update record
Getting Started with MongoDB