Working with MongoDB in DevScribe

Estimated reading: 2 minutes 13 views

MongoDB is a document-oriented database that stores data as flexible, JSON-like documents rather than rows and columns.

DevScribe’s Database Client supports MongoDB, allowing you to connect to a MongoDB database, explore collections and documents, and run queries directly from your workspace.

Connect to MongoDB

To connect a MongoDB database in DevScribe:

  1. Open the Database plugin.
  2. Create a New Connection.
  3. Select MongoDB as the database type.
  4. Enter the connection details for your MongoDB instance.

The connection configuration lets you provide the details required to access your database.

Once the connection is established, your MongoDB database becomes available in the Database workspace.

Explore Collections and Documents

MongoDB organizes data differently from relational databases.

Instead of tables, MongoDB uses collections, which contain documents.

Once connected, you can browse your database and inspect its collections and documents directly in DevScribe.

For example, a users collection might contain documents such as:

{
  "name": "Aarav",
  "email": "aarav@example.com",
  "role": "Developer"
}

This makes it easy to inspect the structure and contents of an existing MongoDB database while working on an application.

Run MongoDB Queries

DevScribe also lets you run MongoDB queries from the database workspace.

For example, to retrieve the documents in the users collection:

db.users.find()

The results are displayed directly in DevScribe, allowing you to inspect your MongoDB data without switching to another database client.

Work With MongoDB Alongside Your APIs

MongoDB is often used as the data layer behind applications and APIs.

While testing an API, you may want to check the documents stored in MongoDB to understand what the endpoint is reading or modifying.

With both resources available in DevScribe, you can move between:

API Request, MongoDB Collection, and Document

This makes it easier to understand how your application’s API and database work together.

Why Use MongoDB in DevScribe?

MongoDB support is useful when you need to:

  • Explore MongoDB databases
  • Browse collections and documents
  • Run MongoDB queries
  • Inspect application data
  • Work with MongoDB-backed APIs
  • Keep database work alongside your documentation and development resources

Conclusion

DevScribe’s Database Client brings MongoDB into the same workspace as your APIs, documentation, code, and other development tools.

You can connect to a MongoDB database, explore its collections and documents, and run queries without leaving your DevScribe workspace.

Here’s a walkthrough:

Leave a Reply

Your email address will not be published. Required fields are marked *

Share this Doc

Working with MongoDB in DevScribe

Or copy link

CONTENTS