Skip to content
Studio 3T - The professional GUI, IDE and client for MongoDB
  • Tools
    • Aggregation Editor
    • IntelliShell
    • Visual Query Builder
    • Export Wizard
    • Import Wizard
    • Query Code
    • SQL Query
    • Connect
    • Schema Explorer
    • Compare
    • SQL ⇔ MongoDB Migration
    • Data Masking
    • Task Scheduler
    • Reschema
    • More Tools and Features
  • Solutions
  • Resources
    • Knowledge Base
    • MongoDB Tutorials & Courses
    • Tool/Feature Documentation
    • Blog
    • Community
    • Testimonials
    • Whitepapers
    • Reports
  • Contact us
    • Contact
    • Sales Support
    • Feedback and Support
    • Careers
    • About Us
  • Store
    • Buy Now
    • Preferred Resellers
    • Team Pricing
  • Download
  • My 3T
search

Studio 3T Knowledge Base

  • Documentation
  • Tutorials
  • Workshops
Take the fastest route to learning MongoDB. Cover the basics in two hours with MongoDB 101, no registration required.
Start the free course

6 Tips for Adding MongoDB to Your Database Architecture

Posted on: 20/11/2019 (last updated: 04/08/2021) by Kathryn Vargas

So you’ve worked with relational databases and can write SQL queries like a pro. Then your team decides to dabble in NoSQL and throws MongoDB into the database architecture. Where do you, the seasoned SQL DBA, even begin?

The reality is, most DBAs already have to deal with both SQL and NoSQL databases, and the trend shows it will be a mix of both for a while. But it’s no reason to be intimidated: With these six tips, you’ll be properly equipped for your new MongoDB tasks in no time.

Speak the (MongoDB query) language

With MongoDB in your database mix, you’ll be expected to query your databases and run reports. And for that, you’ll need to know the right commands.

The first step in the transition from SQL to MongoDB is to learn the MongoDB query language, which uses BSON (Binary JSON), a language based on JSON (JavaScript Object Notation).

A good place to start is MongoDB’s documentation, but there are also MongoDB tools that will accelerate your query writing skills.

The MongoDB GUI Studio 3T lets you build queries through a visual drag-and-drop builder while showing you how they translate to the mongo shell language, C#, Python, Java, and JavaScript.

It even lets you use SQL to query MongoDB, the very first MongoDB GUI to do so.

The Query Code tab will autmatically generate your query in mongo shell, JavaScript, Java, C#, and Python

If you already know JSON or JavaScript, you’ll pick up the MongoDB lingo easily. But if you’re firmly rooted in SQL, you might find MongoDB commands quite complex. So take advantage of tools that will help you learn the language, while getting things done more accurately with a visual interface.

Monitor and measure

Part of closely monitoring your database is that you can diagnose problems earlier. It’s better to prevent a death on the server than conduct the post-mortem. As Amazon once eloquently put it:

Amazon slide about metrics

So what exactly do you need to measure?

MongoDB’s claim to mainstream NoSQL fame is its ability to scale, thanks to sharding capabilities designed to spread storage across multiple servers. As a MongoDB DBA, shard metrics should be part of your list, like keeping an eye out on how the load being balanced across shards.

As with any other database, you also need to consider host metrics. Are you fully utilizing your databases? How’s your network behaving? While you can anticipate workload changes, it is equally important to monitor any capacity changes so that your team can make adjustments in time.

Then there’s the daily grind. To monitor standard operations, metrics like operation counts and network requests will help you capture any changes in your team’s MongoDB usage.

Manage your MongoDB indexes

Think of indexes in MongoDB as what sitemaps are to Google. They help “guide” your MongoDB to scan fewer documents to satisfy a query, sparing the need to go through all documents which worsens performance.

The takeaway here is, indexes speed up queries significantly.

MongoDB supports several index types, which you can easily add and modify using MongoDB tools.

Schema design is still important

Another MongoDB claim to fame is its schema-less design, which attracted many developers and startups whose evolving ideas would have been limited by a set structure.

While it’s advantageous to work with a database with room for flexibility and agility, it’s still critical for a DBA to anticipate the needs and understand the requirements of a given project.

Know which data would benefit from the structure of a relational database or the flexibility of a non-relational one, while keeping in mind that hybrid approaches might be the way to go. MongoDB has been known to support wildly differing use cases, with companies large and small continuing to choose it for increasingly complex projects.

Once you’ve defined your schema design, MongoDB tools like Studio 3T can help you keep track of your data’s schema to make sure you and your team always adhere to it.

Secure your database

You’ve likely heard about the recent ransomware attacks on MongoDB, and it goes without saying that you need to secure your MongoDB database. What’s important to understand here is that the culprit is not the database, but the failure to activate MongoDB’s built-in authentication mechanisms.

Have a look at MongoDB’s security checklist and these steps, which were published following the wave of malware attacks, to make sure you’re covered.

Take advantage of MongoDB resources

In addition to their excellent documentation, MongoDB also runs MongoDB University, where you can enroll in introductory to advanced courses for free. Courses run on a set schedule, so make sure you register in time.

MongoDB also administers the MongoDB Certified DBA Associate Level Exam, which is something to keep in mind as you hone your MongoDB skills. At 150 USD, you can take the exam, earn a certification, and pimp up your LinkedIn profile.

And if you’re looking to learn MongoDB as part of a wider tech stack, we recommend that you check out MEAN and MERN.


How helpful was this article?
This article was hideous
This article was bad
This article was ok
This article was good
This article was great
Thank you for your feedback!

About The Author

Kathryn Vargas

When she's not writing about working with MongoDB, Kathryn spends her free time exploring Berlin's food scene, playing the drums, learning languages (current mission: German), and hiking.

Article navigation

Related articles

  • Adding Lookup Data to the Aggregation Pipeline: Test your skills
  • MongoDB Monitoring, Auditing & Authentication: 3 Steps to Secure Your Database
  • MongoDB DevOps Checklist: 3 Steps to Secure Your Database
  • Lesson 1, Exercise 1: Adding a document to a collection
  • Lesson 3, Exercise 3: Adding and removing fields in the aggregation pipeline

Studio 3T

MongoDB Enterprise Certified Technology PartnerSince 2014, 3T has been helping thousands of MongoDB developers and administrators with their everyday jobs by providing the finest MongoDB tools on the market. We guarantee the best compatibility with current and legacy releases of MongoDB, continue to deliver new features with every new software release, and provide high quality support.

Find us on FacebookFind us on TwitterFind us on YouTubeFind us on LinkedIn

Education

  • Free MongoDB Tutorials
  • Connect to MongoDB
  • Connect to MongoDB Atlas
  • Import Data to MongoDB
  • Export MongoDB Data
  • Build Aggregation Queries
  • Query MongoDB with SQL
  • Migrate from SQL to MongoDB

Resources

  • Feedback and Support
  • Sales Support
  • Knowledge Base
  • FAQ
  • Reports
  • White Papers
  • Testimonials
  • Discounts

Company

  • About Us
  • Blog
  • Careers
  • Legal
  • Press
  • Privacy Policy
  • EULA

© 2023 3T Software Labs Ltd. All rights reserved.

  • Privacy Policy
  • Cookie settings
  • Impressum

We value your privacy

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes ("analytics and marketing") and to provide you with additional functions (“functional”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data.

By clicking “Accept all”, you consent to the storage of cookies and the processing of personal data for these purposes, including any transfers to third countries. By clicking on “Decline all”, you do not give your consent and we will only store cookies that are necessary for our website. You can customize the cookies we store on your device or change your selection at any time - thus also revoking your consent with effect for the future - under “Manage Cookies”, or “Cookie Settings” at the bottom of the page. You can find further information in our Privacy Policy.
Accept all
Decline all
Manage cookies
✕

Privacy Preference Center

With your consent, we and third-party providers use cookies and similar technologies on our website to analyse your use of our site for market research or advertising purposes ("analytics and marketing") and to provide you with additional functions (“functional”). This may result in the creation of pseudonymous usage profiles and the transfer of personal data to third countries, including the USA, which may have no adequate level of protection for the processing of personal data. Please choose for which purposes you wish to give us your consent and store your preferences by clicking on “Accept selected”. You can find further information in our Privacy Policy.

Accept all cookies

Manage consent preferences

Essential cookies are strictly necessary to provide an online service such as our website or a service on our website which you have requested. The website or service will not work without them.

Performance cookies allow us to collect information such as number of visits and sources of traffic. This information is used in aggregate form to help us understand how our websites are being used, allowing us to improve both our website’s performance and your experience.

Google Analytics

Google Ads

Bing Ads

Facebook

LinkedIn

Quora

Hotjar

Functional cookies collect information about your preferences and choices and make using the website a lot easier and more relevant. Without these cookies, some of the site functionality may not work as intended.

HubSpot

Social media cookies are cookies used to share user behaviour information with a third-party social media platform. They may consequently effect how social media sites present you with information in the future.

Accept selected