Found 1357 Articles for MongoDB

Drop Collection if already exists in MongoDB using Python

Devesh Chauhan
Updated on 05-May-2023 12:58:01
MongoDB is a widely popular open-source database that stores data in a flexible JSON like format. It does not use the orthodox technique of storing data in rows and columns. Instead, it uses a more flexible approach which increases its scalability. This database is designed to handle large volumes of data and therefore, it is tailor made for modern applications. A MongoDB database consists of “collections” which is similar to a table in a RDBMS. A collection is a group of documents consisting of fields with different types of values. A database can contain numerous collections and each ... Read More

How to Install & Setup MEAN Stack on Ubuntu (MongoDB, Express.JS, Angular.JS, Node.JS)

Satish Kumar
Updated on 28-Apr-2023 16:54:18
The MEAN stack is a popular web development framework consisting of MongoDB, Express.js, Angular.js, and Node.js. It is an open-source platform that allows developers to create robust web applications quickly and efficiently. In this article, we will guide you through the installation and setup process of the MEAN stack on Ubuntu. Step 1: Install Node.js and NPM Node.js is the runtime environment that allows developers to run JavaScript code outside of the browser. It is the backbone of the MEAN stack. To install Node.js on Ubuntu, follow these steps − Open the terminal on Ubuntu by pressing Ctrl+Alt+T. Type the ... Read More

How to Use Go With MongoDB?

Sabid Ansari
Updated on 26-Apr-2023 11:21:12
MongoDB is a popular NoSQL database that is widely used in modern web applications. Go, on the other hand, is a fast and efficient programming language that is becoming increasingly popular for building web applications. In this article, we will discuss how to use Go with MongoDB, including how to connect to a MongoDB database and how to perform basic CRUD operations. Installing the MongoDB Driver for Go Before we can start using Go with MongoDB, we need to install the MongoDB driver for Go. The easiest way to do this is by using the following command − go get ... Read More

5 Useful Tools to Monitor MongoDB Performance

Satish Kumar
Updated on 11-Apr-2023 10:42:22
As more and more businesses are shifting to MongoDB for their database management, it is important to keep a close eye on its performance. Monitoring MongoDB performance can help you identify any potential issues, prevent downtime, and improve overall efficiency of your database. Here are 5 useful tools to monitor MongoDB performance − MongoDB Compass MongoDB Compass is a visual tool that provides a comprehensive view of your MongoDB database. It allows you to monitor performance of your MongoDB instance in real-time, with metrics such as disk usage, memory usage, and network traffic. With MongoDB Compass, you can also identify ... Read More

How to restart a NoSQL Database service like MongoDB?

Satish Kumar
Updated on 01-Dec-2022 08:57:14
If we're going to use a NoSQL DB for our app, then we want something fast and easy to use. We learn that "NoSQL" doesn't necessarily imply "no maintenance". We think about using managed hosting services like MongoDB's Atlas or Amazon's DynamoDB, but we choose to host it ourselves, whether on our premises or in our own cloud instance. We evaluate several NoSQL options including Redis and Cassandra and pick MongoDB. We may be able to get it installed by installing it from our Linux distribution, using Mongo’s repositories, or using a snap. But if something goes wrong, we might ... Read More

Difference between Hadoop and MongoDB

Pradeep Kumar
Updated on 25-Jul-2022 09:43:53
Hadoop was built to store and analyze large volumes of data across several computer clusters. It's a group of software programs that construct a data processing framework. This Java-based framework can process enormous amounts of data quickly and cheaply.Hadoop's core elements include HDFS, MapReduce, and the Hadoop ecosystem. The Hadoop ecosystem is made up of many modules that help with system coding, cluster management, data storage, and analytical operations. Hadoop MapReduce helps analyze enormous amounts of organized and unstructured data. Hadoop's parallel processing uses MapReduce, while Hadoop is an Apache Software Foundation trademark.Millions of people use MongoDB, an open-source NoSQL ... Read More

SignUp form using Node and MongoDB

Mayank Agarwal
Updated on 29-Apr-2021 09:30:47
In this article, we will create a simple user sign-up form having some parameters. On clicking SAVE, all the user details will be saved in the MongoDB database.InstallationBefore proceeding to create the sign-up form, the following dependencies must be succesfully installed on your system.Check and install express by using the following command. Express is used to set middlewares to respond to HTTP requestsnpm install express --saveSetup the "body-parser" node module for reading the HTTP POST data.npm install body-parser --saveSetup "mongoose", as it sits on top of Node's MongoDB driver.npm install mongoose --saveExample 1Create the following files and copy paste the ... Read More

Connecting MongoDB with NodeJS

Mayank Agarwal
Updated on 27-Apr-2021 09:11:43
Introduction to mongodb.connectThis method is used to connect the Mongo DB server with our Node application. This is an asynchronous method from MongoDB module.Syntaxmongodb.connect(path[, callback])Parameters•path – The server path where the MongoDB server is actually running along with its port.•callback – This function will give a callback if any error occurs.Installing Mongo-DBBefore proceeding to try connect your application with Nodejs, we need to setup our MongoDB server first.Use the following query to install mongoDB from npm.npm install mongodb –saveRun the following command to set up your mongoDB on the specific localhost server. This will help in creating connection with the ... Read More

MongoDB and Python

Pradeep Elance
Updated on 10-Jul-2020 11:17:08
MongoDB is a widely used document database which is also a form of NoSQL DB. Python can interact with MongoDB through some python modules and create and manipulate data inside Mongo DB. In this article we will learn to do that. But MongoDB should already be available in your system before python can connect to it and run. To setup MongoDB in your system please visit our  MongoDB tutorial here..Install pymongoTo interact with MongoDB we need the module names pymongo. Install it in your python environment using the below command.pip install pymogoCheck the Existing DBsWe now use this python module ... Read More

MongoDB Aggregate group multiple result?

AmitDiwan
Updated on 01-Jul-2020 07:03:26
To aggregate multiple result, use $group in MongoDB. Let us create a collection with documents −> db.demo765.insertOne( ... ...    { ...       Name:"John", ...       "Category":"ComputerScience", ...       "SubjectName":"MongoDB", ...       "Marks":75 ...    } ... ); {    "acknowledged" : true,    "insertedId" : ObjectId("5eb054525637cd592b2a4b01") } > > db.demo765.insertOne( ...    { ...       Name:"John", ...       "Category":"ComputerScience", ...       "SubjectName":"MySQL", ...       "Marks":85 ...    } ... ); {    "acknowledged" : true,    "insertedId" : ObjectId("5eb054525637cd592b2a4b02") } > db.demo765.insertOne( ... ... Read More
1 2 3 4 5 ... 136 Next
Advertisements