Rookie Ah ... Just spit out your own groove.
A preparatory work:
1. Install the server: Go to the official website to download http://www.mongodb.org/downloads In fact, it also comes with a client shell
2. Install the client: Mongovue http://blog.mongovue.com/is not completely free to hack: http://yhv5.com/mongovue_480.html
Download the server after the direct installation of my download on the D drive also installed on the D-Drive ...
There are no commands needed to start the service side of MongoDB .... Directly left mouse button double-click the bin in the Mongod.exe to start, and then double-click Mongo.exe, bring the shell also started, and then you can open the MongoDB trip ... What, da?
3 Test the connection: Enter the DB carriage return, OK to connect to the test database
4. Connect Mongodbvue: As shown below ...
Learning is mainly in the self-contained shell operation ...
5. Basic Crud ...
(1) Create: First build a local variable, and then insert this variable into the blog collection
post={"title": "MyBlog", "Content": "This is my ..."}db.blog.insert (POST);
(2) Read:
Db.blog.find ()
(3) Update:
(1) first modify the Post object post.comment=[] (2) modify Data db.blog.update ({title:"MyBlog"},post)
(4) Delete:
Db.blog.remove ({title: "MyBlog"})