MongoDB Compass – Shell
mongodb://localhost:27017
MongoDB Compass
MongoDB Compass is a powerful GUI for querying, aggregating, and analyzing your
MongoDB data in a visual environment.
Compass is free to use and source available, and can be run on macOS, Windows, and
Linux.
MongoDB Compass comes in three versions: a full version with all features, a read-only
version without write or delete capabilities, and an isolated edition, whose sole network connection
is to the MongoDB instance.
Compass
The full version of MongoDB Compass, with all features and capabilities.
Readonly Edition
This version is limited strictly to read operations, with all write and delete capabilities
removed.
Isolated Edition
This version disables all network connections except the connection to the MongoDB
instance.
Open the Embedded MongoDB Shell
MongoDB Shell is a powerful, interactive command-line interface that enables developers
and database administrators to perform operations and manage their MongoDB databases using
JavaScript syntax.
MongoDB Shell is a JavaScript-based tool that allows users to interact with MongoDB databases
directly from the command line. It facilitates a wide range of operations from simple CRUD
(Create, Read, Update, Delete) operations to more advanced database management tasks, making it
an essential tool for anyone working with MongoDB.
MongoDB Shell allows developers to:
Perform CRUD operations
Query databases using rich syntax
Execute aggregation queries for data analysis
Handle large datasets efficiently
Interact with the database in real-time using an interactive interface
MongoDB Shell Interface
The MongoDB Shell provides a direct interface between users and their MongoDB
databases, making it easier to perform a wide variety of tasks. It simplifies operations like:
Creating and deleting databases
Inserting and modifying documents
Running complex queries
Managing collections
The interface uses JavaScript syntax, which allows developers to take advantage of its
flexibility and execute complex queries. The immediate feedback and command history support
make it perfect for both beginners and advanced users.
Key Features of MongoDB Shell
MongoDB Shell comes packed with essential features that enhance the database
management experience. Here are some key highlights:
Interactive Environment: MongoDB Shell offers an interactive experience where you can enter
commands and see immediate results, making it ideal for learning and testing.
JavaScript-Based: Since the shell uses JavaScript, you can leverage its rich capabilities to
manipulate data and execute complex queries.
Support for CRUD Operations: It perform all Create, Read, Update and Delete (CRUD)
operations effortlessly through the shell.
Aggregation Framework: Access advanced data processing features using the aggregation
framework.
Cross-Platform Compatibility: It use MongoDB Shell on various operating systems, including
Windows, macOS and Linux.
Launch the Shell
Open your terminal or command prompt.
Type mongosh to start the MongoDB Shell.
Access Help
Type help within the shell to get a list of available commands and their descriptions.