Install MongoDB and MongoDB Compass On Windows 10 and Basic MongoDB Commands

126 Aufrufe
Published
MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL).

In this video, you get to know how to install MongoDB Community Server and MongoDB Compass on Microsoft Windows 10. After installing MongoDB Server and MongoDB Compass we have discussed about accessing MongoDB from the command prompt and execute some basic commands listed below,

show dbs -- Display existing databases
use dbname -- Get into a database, if does not exist then automatically create and then get inside the database
db -- Display the database that you are currently logged in
show collections -- Display all the collections inside your current database
db.createCollection("emp"); -- Create a collection by name emp
db.dept.insert([{deptno: 10, dname: "RESEARCH"}]); -- Insert into a collection, if collection does not exist then create and then insert
db.dept.find(); -- Display records in-dept collection
db.dept.find().pretty(); -- Display records in JSON format

At the end of this video, we have even discussed how to perform basic operations we performed in command prompt operations using MongoDB Compass.
Kategorien
PC (Windows/Mac/Linux) Anleitungen
Kommentare deaktiviert.