<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rameshjayarathne on Medium]]></title>
        <description><![CDATA[Stories by Rameshjayarathne on Medium]]></description>
        <link>https://medium.com/@rameshjayarathne?source=rss-420922f8c0d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Vda2CUgnKqFwc2zY</url>
            <title>Stories by Rameshjayarathne on Medium</title>
            <link>https://medium.com/@rameshjayarathne?source=rss-420922f8c0d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:25:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rameshjayarathne/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Is MongoDB?]]></title>
            <link>https://medium.com/@rameshjayarathne/what-is-mongodb-b2a227ec9ead?source=rss-420922f8c0d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2a227ec9ead</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[database-management]]></category>
            <dc:creator><![CDATA[Rameshjayarathne]]></dc:creator>
            <pubDate>Sun, 09 Jul 2023 02:36:13 GMT</pubDate>
            <atom:updated>2023-07-09T02:36:13.327Z</atom:updated>
            <content:encoded><![CDATA[<p>MongoDB is an open-source, document-oriented NoSQL database designed to handle large amounts of data and provide fast performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*rwejdwTg1r22BBmuBcDaBA.jpeg" /></figure><p>MongoDB is an open-source, NonSQL(non-relational) database management system. It is designed to store and manage large volumes of structured, semi- structured and unstructured data. MongoDB provides a cloud-base platform called MongoDB Atlas. MongoDB data records are stored on Binary JayaScript Objection Notation format.</p><p>MongoDB Atlas fully manages cloud database service that offers all features and capabilities of MongoDB without the need for infrastructure management.</p><p>With MongoDB Atlas, you can easily deploy, scale, and manage your MongoDB database in the cloud. It provides a user-friendly web interface and a set of powerful tools to crate, configure, and monitor your database</p><h3>What Is MongoDB Used For?</h3><p>MongoDB can handle large amounts of data quickly and was built to be used for both application development and application scaling. Here are five reasons why you might deploy a MongoDB database.</p><ol><li>Document — Oriented: MongoDB Is a NoSQL database technology and its stores data in flexible, self-describing documents. Each documents have a different structure, thereby making it easy and fast to retrieve records</li><li>Scalability: MongoDB is designed to scale horizontally, which means it can handle large amounts of data and high traffic loads by distributing the data across multiple servers or clusters.</li><li>High performance: MongoDB is performed fast even when dealing with huge amounts of data. This is the major benefit to application that need to quickly search for a piece of data and display output to an end user</li><li>Flexible Querying: MongoDB supports flexible queries, including ad-hoc queries, range queries, sorting and field-level updates. It also offers a powerful aggregation framework for advanced data analysis and reporting</li><li>Rich Functionality: MongoDB provides various advanced features like geospatial indexing, text search, in-memory storage engine, and support for transactions in multi-document ACID (Atomicity, Consistency, Isolation, Durability) operations.</li></ol><h3>How to install MongoDB your PC ?</h3><p>Choose the appropriate installation package: MongoDB provides installation packages for various operating systems. Visit the MongoDB Downloads page (<a href="https://www.mongodb.com/try/download/community">https://www.mongodb.com/try/download/community</a>) and select the package that matches your operating system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LO29Q2oFqSqjg6gUNHgrIQ.png" /></figure><p>Download the installation package: Click on the appropriate download link for your operating system and save the installation package to your computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*lFSJHshuoN0OthmCxBDSKA.png" /></figure><p><strong>Create and Connect to Database Deployments</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ylCK4-n3HPgIMiyY--CImg.png" /><figcaption>Database Deployments</figcaption></figure><p>Create a new project:</p><ul><li>After logging in to MongoDB Atlas, click on the “Create New Project” button.</li><li>Provide a name for your project and select the organization you want to associate it with (if applicable).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OfeW0yAdJphYcUjlgw6gQw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A88U_fzfzv_2pvOzKu5L-w.png" /></figure><p>To set up network access for MongoDB, you need to configure networking settings in your MongoDB deployment. Here are the general steps to set up network access:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mR0kTqOLYa7yJGHdP_tFRQ.png" /></figure><p>click on Add IP Address, below window will be appear on your screen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1pmNYWT0GALQ58qp3-MYtg.png" /></figure><p>Click on the “Add IP Address” button to whitelist your IP address. This allows your IP to access the MongoDB deployment.</p><p>create a new cluster</p><ul><li>In your project dashboard, click on the “Build a Database” button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XlUPqPUazXA0BsJRzFUGw.png" /></figure><ul><li>Choose the cloud provider, region, and other configuration options for your cluster. You can select the free tier or choose different options based on your needs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*cJTvZoUGCrS78Pik1CPERg.png" /></figure><ul><li>Click on the “Create” button to start creating your MongoDB cluster. It may take a few minutes for the cluster to be provisioned.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0VIK1Z98pjDA_RST2CR2iA.png" /></figure><p>Once the cluster is created, you can configure additional settings such as enabling backup, setting up access control, and more. You can access these settings in the “Cluster” view of your MongoDB Atlas dashboard.</p><p>Connect to the cluster</p><ul><li>In the “Cluster” view, click on the “Connect” button for your cluster.</li><li>Choose a connection method based on your requirements. The options typically include connecting using MongoDB Compass, the MongoDB shell, or connecting via application code using connection strings.</li><li>Follow the instructions provided by MongoDB Atlas to establish the connection. These instructions may include downloading MongoDB Compass or displaying the connection</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wmAbd6acNXvyNGcXZRhUg.png" /></figure><ul><li>If you choose to connect using MongoDB Compass, download and install MongoDB Compass if you haven’t already.</li><li>Open MongoDB Compass and choose the “Connect” option.</li><li>Copy the connection string provided by MongoDB Atlas and paste it into the MongoDB Compass connection dialog.</li><li>Modify the connection settings if necessary (e.g., add your MongoDB Atlas username and password).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z3J-vx_1jg5OgQ7Xqa7e5Q.png" /></figure><p>Click on the “Connect” button to establish the connection to your MongoDB cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KEKCTkhvuziQOG9JDSlJWg.png" /></figure><h3>Explain the other tabs of MongoDB?</h3><p><strong>Date Lake</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*WY5Bx-_S-N6xsg4R0TMx0A.png" /></figure><p>In the context of MongoDB, a data lake typically refers to a data lake architecture implemented using MongoDB as the underlying storage platform. This approach involves using MongoDB as a data repository within a data lake ecosystem, taking advantage of MongoDB’s flexibility, scalability, and document-oriented model.</p><p><strong>Triggers</strong></p><p>Change Streams provide a way to listen to a MongoDB collection and receive notifications whenever a change occurs. These changes can include inserts, updates, deletes, and replacements of documents within the collection. By using Change Streams, you can create your own custom triggers or event-driven workflows.</p><p>Here’s a general approach to implementing triggers using Change Streams in MongoDB:</p><ol><li>Set up a Listener: Register a listener or callback function to handle the changes emitted by the Change Stream. This function will be called whenever a change occurs in the monitored collection.</li><li>React to Changes: In the listener function, you can define the actions you want to take in response to the changes. This can include updating related documents, triggering external processes, sending notifications, or performing any other custom logic.</li></ol><p><strong>Data API</strong></p><p>The MongoDB Data API is a feature introduced in MongoDB Atlas that allows you to interact with your MongoDB database using standard RESTful API calls. It provides a simplified way to access and manipulate data in MongoDB without requiring a MongoDB driver or directly connecting to the database.</p><p>Here are the some features and benefits of the MongoDB Data API:</p><ol><li>Secure Access Control: The Data API integrates with MongoDB Atlas security features, allowing you to control access to your data using MongoDB’s authentication and authorization mechanisms. You can define user roles and permissions to restrict access to specific collections and operations.</li><li>Automatic Schema Validation: The Data API automatically enforces the defined schema validation rules for your collections, ensuring that the incoming data adheres to the specified structure and constraints. This helps maintain data integrity and consistency.</li><li>Custom Functions and Aggregations: The Data API supports executing custom functions and aggregations on your data. You can define custom functions in JavaScript or BSON, upload them to Atlas, and invoke them through the API.</li></ol><p><strong>Data Federation</strong></p><p>MongoDB is primarily focused on providing a highly scalable and flexible document database solution for individual deployments. MongoDB can still be used in conjunction with other tools and technologies to achieve a form of data federation. Here are a few approaches:</p><ol><li>Data Virtualization: Data virtualization platforms, such as Denodo or Composite, can be utilized to create a virtual layer on top of multiple data sources, including MongoDB databases. These platforms enable you to integrate and query data from different sources, presenting a unified view to users.</li><li>Custom Application Logic: You can develop custom application logic within your own software to federate data from multiple MongoDB databases or other data sources. This approach involves building a layer that interacts with the various data sources and combines the data on-the-fly to provide a unified view to applications.</li></ol><p><strong>Search</strong></p><p>in MongoDB, you can perform searches using various querying techniques and operators. Here are some common approaches to searching in MongoDB:</p><ol><li>Basic Query: The most straightforward way to search in MongoDB is by using the find() method, which retrieves documents from a collection based on specified criteria. For example, to find documents that match a specific condition, you can construct a query using field-value pairs or comparison operators like $eq,$gt, $lt, etc.</li><li>Full-Text Search: If you need to perform full-text search across text fields, MongoDB provides a Full-Text Search feature. With this feature, you can create text indexes on one or more fields and execute text search queries using the $text operator. Full-Text Search supports language-specific stemming, stop words, and other advanced search capabilities.</li></ol><p><strong>Stream Processing</strong></p><p>MongoDB offers a feature called Change Streams, which enables stream processing on real-time data changes in a MongoDB database. Change Streams allow you to monitor and react to data changes occurring within a collection, providing a way to process and analyze data as it is updated.</p><p>Here’s an overview of stream processing using Change Streams in MongoDB:</p><ol><li>Creating a Change Stream: To begin stream processing, you can create a Change Stream by calling the watch() method on a MongoDB collection. This sets up a real-time feed that captures changes happening within the collection.</li><li>Specifying Filter Conditions: You can specify filter conditions to determine which changes are included in the Change Stream. For example, you can filter based on specific fields, document updates, inserts, or deletions. This allows you to focus on relevant changes for your stream processing application.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*DgOwGMaQBJ5Nx7HB_npPwQ.png" /></figure><p>Backup</p><p>In MongoDB, you can create backups of your databases to ensure data protection and disaster recovery. There are multiple approaches and tools available to perform backups in MongoDB, depending on your deployment type and requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*-NUjkGk2EKAEQb-UnA85XA.png" /></figure><p>Here are some common methods:</p><ol><li>mongodump/mongorestore:</li></ol><ul><li>mongodump: The mongodump command-line tool allows you to create a backup of a MongoDB database by exporting the data to BSON files. It can be executed against a running MongoDB instance.</li><li>mongorestore: The mongorestore command-line tool is used to restore data from the backup files created by mongodump. It imports the data back into a MongoDB deployment.</li></ul><p>2. Replica Set Snapshots:</p><ul><li>If you have a MongoDB replica set, you can take snapshots of the data directory of one of the replica set members. This involves using file system-level snapshot tools provided by your operating system or third-party tools specifically designed for database snapshots. Examples include LVM snapshots, file system snapshots (like ZFS or Btrfs), or cloud-specific snapshot mechanisms.</li><li>Ensure that the snapshot process is consistent across all members of the replica set to maintain data integrity.</li></ul><p><strong>Database access</strong></p><p>In MongoDB, database access is controlled through authentication and authorization mechanisms. and provides built-in roles that provide the different levels of access commonly needed in a database system. You can additionally create user-defined roles. A role grants privileges to perform sets of actions on defined resources.</p><p><strong>Network access</strong></p><p>In MongoDB, network access refers to the configuration of network settings to allow clients and applications to connect to the MongoDB server and network access to allow connections from specific IP addresses or enable remote access for broader connectivity.</p><p><strong>Advance</strong></p><p>MongoDB offers several advanced features and capabilities that enhance its functionality and performance. Here are some key advanced features in MongoDB:</p><ol><li>LDAP Authentication</li><li>LDAP Authorization (LDAP Authentication required)</li><li>Encryption at Rest using your Key Management</li><li>Database Auditing</li><li>Self-managed X.509 Authentication</li></ol><h4>Conclusion</h4><p>MongoDB is a popular, open-source, NoSQL document database that provides high flexibility, scalability, and performance for modern applications.</p><p>MongoDB is widely used in a variety of applications, including web and mobile apps, real-time analytics, content management systems, IoT, and more. Its flexible data model, scalability, and rich feature set make it a popular choice for modern data-driven applications.</p><p>This article is written by me with an inspiring journey guided by my lecturer Mr. <a href="https://medium.com/u/3f021514b269?source=post_page-----b4743727e7f1--------------------------------">Chameera De Silva</a></p><p>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2a227ec9ead" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>