While working on SQL Server Comprehensive Database Performance Health Check, with a client who uses many different SQL and NoSQL databases. During the consultation engagement, we ended up a very interesting query which actually runs faster on MongoDB and slows on SQL Server. I asked him to show me a Schema for the table in MongoDB, which inspired me to write this blog post on MongoDB Compass – Missing a Schema Section.
If you are using MongoDB, I am very confident that you are familiar that there are two primary tools to interact with MongoDB: 1) MongoDB Compass – Graphical interface and 2) MongoDB Shell – Command Prompt.
As I requested my client to show me a Schema of a MongoDB table, he opened the most popular tool MongoDB Compass and to his surprise, there was a no TAB for Schema. The DBA was really confused and frustrated as every single time he was able to use the Schema Tab which was missing at this point in time.
After a while, he realized that while in a rush, instead of MongoDB Compass, he had opened MongoDB Compass Community, which has limited features. He eventually opened MongoDB Compass and was able to find the Schema tab and we were able to look at the necessary schema. After figuring out the Schema of the table, I was able to help him to improve his SQL Server query, which eventually ran faster on SQL Server. I will write a detail blog post in the future.
Summary – Missing a Schema Section
If you ever find Schema and Validation Tab missing in your MongoDB Compass, it is quite possible that instead of MongoDB Compass, you have opened MongoDB Compass Community which has limited features. You can download MongoDB Compass from this link.
Here are some of the relevant blog posts on MongoDB.
- Foundations of Document Databases with MongoDB – Video Course
- SQL Terms vs MongoDB Terms
- MongoDB Compass – Missing a Schema Section
- MongoDB Fundamentals – Getting Started – Day 1 of 6
- MongoDB Fundamentals – CRUD: Creating Objects – Day 2 of 6
- MongoDB Fundamentals – CRUD: Reading Objects – Day 3 of 6
- MongoDB Fundamentals – CRUD: Updating Objects – Day 4 of 6
- MongoDB Fundamentals – CRUD: Deleting Objects – Day 5 of 6
- MongoDB Fundamentals – Mapping Relational SQL – Day 6 of 6
Reference: Pinal Dave (http://blog.SQLAuthority.com)