<?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en-US">
	<title>Angel's Blog</title>
	<link rel="alternate" type="text/html" href="https://angelcool.net/sphpblog/blog_index.php" />
	<modified>2026-05-27T15:36:52Z</modified>
	<author>
		<name>Angel</name>
	</author>
	<copyright>Copyright 2026, Angel</copyright>
	<generator url="http://www.sourceforge.net/projects/sphpblog" version="0.7.0">SPHPBLOG</generator>
	<entry>
		<title>MongoDB CLI 101 Fundamentals</title>
		<link rel="alternate" type="text/html" href="https://angelcool.net/sphpblog/blog_index.php?entry=entry140111-120503" />
		<content type="text/html" mode="escaped"><![CDATA[<pre><br />[Angel@localhost ~]$ mongo<br />&gt; show collections; //equivalent to rdbms tables<br />&gt; use test; //use test db<br />&gt; db.test.count();<br />&gt; db.test.find(); //all documents, a document is like a rdbms row.<br />&gt; db.test.find({_id:ObjectId(&quot;52c351ffc5c629a6ca901ae5&quot;)});// where _id equals to...<br />&gt; db.test.find({_id:ObjectId(&quot;52c351ffc5c629a6ca901ae5&quot;)},{&#039;_id&#039;:0}); // _id field is not displayed<br />&gt; db.test.update({_id:ObjectId(&quot;52c351ffc5c629a6ca901ae5&quot;)},{&#039;field-to-update&#039;:&#039;new-value&#039;});//updating a field<br />&gt; db.test.update({_id:ObjectId(&quot;52c351ffc5c629a6ca901ae5&quot;)},{$set:{&#039;Year&#039;:2014}}); //add new field<br /><br /></pre>]]></content>
		<id>https://angelcool.net/sphpblog/blog_index.php?entry=entry140111-120503</id>
		<issued>2014-01-11T00:00:00Z</issued>
		<modified>2014-01-11T00:00:00Z</modified>
	</entry>
</feed>
