<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sharanjeet kaur</title>
    <description>The latest articles on Forem by Sharanjeet kaur (@sharanjeet710).</description>
    <link>https://forem.com/sharanjeet710</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F379165%2F2eda206a-626b-4e34-aac4-ef3fd2cf1a0b.jpeg</url>
      <title>Forem: Sharanjeet kaur</title>
      <link>https://forem.com/sharanjeet710</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sharanjeet710"/>
    <language>en</language>
    <item>
      <title>SQL - Sub Queries</title>
      <dc:creator>Sharanjeet kaur</dc:creator>
      <pubDate>Fri, 29 Oct 2021 09:58:36 +0000</pubDate>
      <link>https://forem.com/sharanjeet710/sql-sub-queries-3epc</link>
      <guid>https://forem.com/sharanjeet710/sql-sub-queries-3epc</guid>
      <description>&lt;p&gt;SQL is the standard language for the Relational Database, for storing, manipulating and retrieving stored data. For basics of SQL (&lt;a href="https://www.tutorialspoint.com/sql/"&gt;link&lt;/a&gt;)&lt;/p&gt;

&lt;h4&gt;
  
  
  Why Sub Query? 🤨
&lt;/h4&gt;

&lt;p&gt;It is easy to understand and maintain. Subqueries use the result of the query in the outer query.&lt;br&gt;
Subqueries divide the complex queries into parts so that a complex query can be broken into a series of logical steps. It can also replace complex joins and union.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0YlyIYmZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/prsdzvuktnlejl617fpu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0YlyIYmZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/prsdzvuktnlejl617fpu.png" alt="Image description" width="880" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Sub Queries
&lt;/h4&gt;

&lt;p&gt;A subquery or a nested query is a query within another SQL query. subquery return data that will be used in the main query as a condition to further restrict the retrieved data. &lt;/p&gt;

&lt;p&gt;Subqueries can be used with the SELECT, INSERT, UPDATE, DELETE statements with operators like =, !=, &amp;lt;, &amp;gt;, BETWEEN, IN etc.&lt;/p&gt;

&lt;h4&gt;
  
  
  Subquery with SELECT statement:
&lt;/h4&gt;

&lt;p&gt;Subqueries are mostly used with select statement. The basic syntax is:&lt;br&gt;
SELECT ColumnName FROM TableName &lt;br&gt;
WHERE ColumnName Operator (SELECT ColumnName FROM TableName);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iLhi7rVQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r60yn2v9dfxd7a48j5sd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iLhi7rVQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r60yn2v9dfxd7a48j5sd.png" alt="Image description" width="880" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Subquery with INSERT statement:
&lt;/h4&gt;

&lt;p&gt;The INSERT statement uses the result from the subquery to insert into another table. The basic syntax is:&lt;br&gt;
INSERT INTO TableName&lt;br&gt;
SELECT ColumnName FROM TableName &lt;br&gt;
WHERE ColumnName Operator (SELECT ColumnName FROM TableName);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GoZzHsg---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/efy64l773xbfw75pxobg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GoZzHsg---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/efy64l773xbfw75pxobg.png" alt="Image description" width="880" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Subquery with UPDATE statement:
&lt;/h4&gt;

&lt;p&gt;Multiple Columns can be updated using the subquery with the UPDATE statement. The basic syntax is:&lt;br&gt;
UPDATE TableName SET ColumnName = Value&lt;br&gt;
WHERE ColumnName Operator (SELECT ColumnName FROM TableName);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IwHAOwLt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1q7bgwoe86ggwik4zior.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IwHAOwLt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1q7bgwoe86ggwik4zior.png" alt="Image description" width="880" height="243"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Subquery with DELETE statement
&lt;/h4&gt;

&lt;p&gt;Subquery can be used with DELETE statement like with any other statements above. The basic syntax is:&lt;br&gt;
DELETE FROM TableName &lt;br&gt;
WHERE ColumnName Operator (SELECT ColumnName FROM TableName);&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9PEb99n2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a37jptt2rdg94ddu5gy7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9PEb99n2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a37jptt2rdg94ddu5gy7.png" alt="Image description" width="880" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you!! Feel free to comment on any type of feedback or error you have 😄✌&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>sql</category>
      <category>database</category>
    </item>
    <item>
      <title>SQL - Stored Procedure 📦</title>
      <dc:creator>Sharanjeet kaur</dc:creator>
      <pubDate>Wed, 27 Oct 2021 06:54:52 +0000</pubDate>
      <link>https://forem.com/sharanjeet710/sql-stored-procedure-4n2m</link>
      <guid>https://forem.com/sharanjeet710/sql-stored-procedure-4n2m</guid>
      <description>&lt;p&gt;SQL is the standard language for the Relational Database, for storing, manipulating and retrieving stored data. For basics of SQL (&lt;a href="https://www.tutorialspoint.com/sql/" rel="noopener noreferrer"&gt;link&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;A Stored Procedure is a SQL code that we can save, so the code can be reused again and again. &lt;br&gt;
So, if we have any SQL query which we write over and over again, we can use it as a stored procedure so that we can just call it to execute it.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Syntax for creating the stored procedure
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6j2wlzz9nq0w9hvy63mr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6j2wlzz9nq0w9hvy63mr.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  Executing stored procedure
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8qcs3s7xf0r86s7jae3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8qcs3s7xf0r86s7jae3f.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Stored Procedure with Parameters
&lt;/h4&gt;

&lt;p&gt;To add Parameters in the procedure, first, we need to alter the procedure for which we can use ALTER procedure statement as follows: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi67hi2habd6ye7f3o9i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxi67hi2habd6ye7f3o9i.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To Execute the above stored procedure, we have to declare a variable for output parameter and specify the parameter as out&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysdwj14a3gj17nkphv0k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fysdwj14a3gj17nkphv0k.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just like this, we can also set multiple parameters by separating each parameter and the data type with a comma &lt;/p&gt;

&lt;h4&gt;
  
  
  Drop a stored procedure
&lt;/h4&gt;

&lt;p&gt;To drop a stored procedure, use the DROP statement as follows:&lt;/p&gt;

&lt;p&gt;DROP PROCEDURE usp_proc;&lt;/p&gt;

&lt;p&gt;Thank you!! Feel free to comment on any type of feedback or error you have 😄✌ &lt;/p&gt;

</description>
      <category>sql</category>
      <category>database</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>MongoDB - Aggregate Pipeline </title>
      <dc:creator>Sharanjeet kaur</dc:creator>
      <pubDate>Wed, 20 Oct 2021 07:35:07 +0000</pubDate>
      <link>https://forem.com/sharanjeet710/mongodb-aggregate-pipeline-200a</link>
      <guid>https://forem.com/sharanjeet710/mongodb-aggregate-pipeline-200a</guid>
      <description>&lt;p&gt;As we have discussed MongoDB basics (&lt;a href="https://dev.to/sharan_710/hey-mongo-14h6"&gt;link&lt;/a&gt;).&lt;br&gt;
Now, let's explore the MongoDB Pipeline concept 🔎&lt;/p&gt;

&lt;h3&gt;
  
  
  Why MongoDB Pipeline? 🤔
&lt;/h3&gt;

&lt;p&gt;The input of the pipeline can be one or several collections. The pipeline then performs a transformation on the data until our expected result is achieved.&lt;/p&gt;

&lt;p&gt;With the help of a pipeline, we can break down a complex query into simple stages, in each of which we can execute the different operations on the data. This also helps us in checking whether our query is functioning properly at each stage by examining both its input and output as the output of each stage will be the input of the next stage.&lt;br&gt;
Below is an illustrated example of a pipeline:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k4X57FwY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sn7qeythboe2b9t7mc9c.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k4X57FwY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sn7qeythboe2b9t7mc9c.gif" alt="" width="880" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Aggregation
&lt;/h3&gt;

&lt;p&gt;Aggregate operations process data records and return the computed result. Aggregate operations can perform many operations on the grouped data to return a single result.&lt;br&gt;
The Syntax for aggregate: db.CollectionName.aggregate(operation) &lt;/p&gt;

&lt;p&gt;Now, if you want to display count, then you will use the following aggregate() method: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OAMVdahM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2mpji4yam79l9b4ihom6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAMVdahM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2mpji4yam79l9b4ihom6.png" alt="Image description" width="740" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, We have grouped the documents by type field and on each occurrence of a type field, the value of sum will be increased.&lt;br&gt;
Equivalent SQL Query for this will be:&lt;br&gt;
select type, count(*) from ProductCatalog group by type&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MWfYeaL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2micagh48y4yxs0khe5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MWfYeaL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2micagh48y4yxs0khe5.png" alt="Image description" width="880" height="467"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Pipeline
&lt;/h3&gt;

&lt;p&gt;MongoDB supports the pipeline concept in the aggregation framework in which we execute an operation on some input and use the output as input for the next command and so on. &lt;br&gt;
There is a set of stages and they are taken as the set of documents as input and produces a resulting set of document. This can be used as an input for the next stage and so on.&lt;/p&gt;

&lt;p&gt;Following are the stages in the aggregation framework:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;$project: Used to select the specific field from the collection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;$match: It's a filtering operation. Equivalent to where clause in RDBMS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;$group: This groups the document.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;$sort: Sorts the document.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;$limit: Used to limit the documents in the output &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zZZ2LAWv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndu12a43b4g04k42zgmf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zZZ2LAWv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndu12a43b4g04k42zgmf.png" alt="Image description" width="848" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8F3VNW5R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlay4a5uetv3i0jma3dm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8F3VNW5R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wlay4a5uetv3i0jma3dm.png" alt="Image description" width="757" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you!! Feel free to comment on any type of feedback or error you have 😄✌ &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>mongodb</category>
      <category>database</category>
    </item>
    <item>
      <title>Hey Mongo!!</title>
      <dc:creator>Sharanjeet kaur</dc:creator>
      <pubDate>Mon, 18 Oct 2021 06:02:38 +0000</pubDate>
      <link>https://forem.com/sharanjeet710/hey-mongo-14h6</link>
      <guid>https://forem.com/sharanjeet710/hey-mongo-14h6</guid>
      <description>&lt;p&gt;MongoDB is an open-source document-oriented database. Here data is stored in a document within a collection as a set of name-value pairs. It does not have a fixed structure defined at the collection level. As data is stored across multiple machines, it is horizontally scalable. It has rich query language that supports CRUD operations, aggregation, text search, and so on.&lt;/p&gt;

&lt;p&gt;The basic building blocks are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Database: It contains all the data generated by the system as collections.&lt;/li&gt;
&lt;li&gt;Collection (Similar to Table in RDBMS): It single entity that contains all the data related to a particular aspect.&lt;/li&gt;
&lt;li&gt;Document (Similar to rows in RDBMS):  Set of fields with associated values of corresponding datatypes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h5&gt;
  
  
  CRUD Operations
&lt;/h5&gt;

&lt;h6&gt;
  
  
  Creating Database
&lt;/h6&gt;

&lt;p&gt;use db_name is used to create the database. The command will create a new database if it doesn't exist, otherwise, it will return the existing database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ljkndk2w35ajz8j5i1j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ljkndk2w35ajz8j5i1j.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Creating Collection
&lt;/h6&gt;

&lt;p&gt;db.createCollection(name) command is used to create collection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futnmhka13p00t7pjitku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Futnmhka13p00t7pjitku.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Insert Operation
&lt;/h6&gt;

&lt;p&gt;To insert data into MongoDB collection, you need to use MongoDB's insert() or save() method, db.CollectionName.insert(document)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fia8o60bdyft3r0s42m37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fia8o60bdyft3r0s42m37.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Read Operation
&lt;/h6&gt;

&lt;p&gt;find() method will display all the documents in a non-structured way, db.CollectionName.find()&lt;br&gt;
To display the results in a formatted way, you can use pretty() method, db.CollectionName.find().pretty()&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctilmwa5rry8w4f2t2ib.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctilmwa5rry8w4f2t2ib.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9gfjv8nyjqnnyae679v0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9gfjv8nyjqnnyae679v0.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  RDBMS Where clause equivalents
&lt;/h6&gt;

&lt;p&gt;To query the document on the basis of some conditions, you can use the following operations.&lt;br&gt;
Equality - {key:{$eq:value}}&lt;br&gt;
Not Equal - {key:{$ne:value}}&lt;br&gt;
Less than - {key:{$lt:value}} &lt;br&gt;
Less than Equals - {key:{$lte:value}}&lt;br&gt;
Greater than - {key:{$gt:value}} &lt;br&gt;
Greater than Equals - {key:{$gte:value}}&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg8s322fywkhqemonihn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg8s322fywkhqemonihn.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Update Operation
&lt;/h6&gt;

&lt;p&gt;The update() method updates the values in the existing document while the save() method replaces the existing document with the document passed in the save() method.&lt;br&gt;
db.CollectionName.update(selection_criteria, updated_data)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61vmdmo39eqbvr9692vg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61vmdmo39eqbvr9692vg.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Delete Operation
&lt;/h6&gt;

&lt;p&gt;MongoDB's remove() method is used to remove a document from the collection.&lt;br&gt;
db.CollectionName.remove(deletion_criteria)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xmpib2pp9hod9wharkx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xmpib2pp9hod9wharkx.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you!! Feel free to comment on any type of feedback or error you have 😄✌&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>mongodb</category>
      <category>tutorial</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
