New Post 🆕
Boost Your Programming Efficiency: Essential Tools for Success ⚙️
Building a Node.js Server Without Using Express.js🐤
Docker...
For further actions, you may consider blocking this person and/or reporting abuse
Nice overview. Loved mongo for very simple document storage where there is little to no need to do any complex joins. It can become a beast when needing to use the aggregation pipeline and transformations I've walked into that a couple of times now and wished I'd have stuck to something more relational. My own fault and lesson learnt 🤣 again though really nice overview and covers so many use cases.
The document data of MongoDB is like JSON (plus has more types) and it includes complex types like objects and arrays, often nested to multiple levels (upto 100 levels is possible as per the docs). Working with these complex structures is not always easy. First, the aggregation pipeline syntax is unlike other database querying syntax and there is a learning curve. Attempting aggregation queries on complex data and complex operations without proper learning, the tools and experience is not uncommon - it can create disappointments.
🤩🥳
This is helpful, I wrote a similar article:
umakantv.medium.com/mongodb-operat... with more types of operators and an example which demonstrates fuzzy text search.
Thank you. It looks like helpful.😊
Awesome post here, Burak! This is a really helpful and easy-to-read cheat sheet. 🙌
I am happy to It was useful. Thank you. 🥳
Good effort 👍.
I would also include the variations of update and delete methods
updateMany
anddeleteMany
. Also,countDocuments
is useful.One of the more useful features of using MongoDB is one can develop applications fast, as it allows quick start and prototyping (for example, I can write application code accessing the database and insert data, query it, etc., without creating a database or a collection, and fields explicitly).
Good stuff. We replaced our legacy XML based document format with MongoDB and saw massive speed improvements in loading and querying data. I'm a big proponent of dealing with documents with large volume/size/complexity this way. One thing I would take issue with though is this:
While yes, it probably does let you store data in exactly the format that represents the original document, I think it is worth stating that it shouldn't be seen as a wholesale replacement for relational databases. A good rule of thumb is if to use MongoDB or any other document database, and you're finding that the document is starting to contain items which are outside the natural scope of the document to get it to work, it is not a good fit.
Define boundaries for what is stored in the document and be aware of the limitations of relationships between documents.
Thanks for sharing this nice comment.😊
Good idea 👍🏻
Improvement idea:
From industrialization point of view
When I do update the mongo part of my application I check every possible queries from repository classes and check fields used to build indexes and avoid perf Issues.
You could maybe add a section about indexes and explain plans.
Thanks for your recommendation. I’m going to add this section. 😇
Thank you for sharing this useful MongoDB cheat sheet. I found it very helpful and concise. It covers the most common commands and operations for working with MongoDB databases.
I appreciate your effort and time in creating this resource!
👾👨🏻💻🙏🏼
Great MongoDB cheat sheet! It's always helpful to have a quick reference guide to assist with common tasks and commands in MongoDB. As someone interested in cloud RCM (Revenue Cycle Management), I can see the potential benefits of integrating MongoDB into cloud-based RCM systems.
Thanks for your comment.😊
I still don't have any usecases for MongoDB, all the data I use ends up being Relational, and I prefer SQL's syntax.
Great reasource for mongo db :)
Thank you :) 👾
really helpful!
I’m glad to hear that. 😄
Thank you for the information.
This is a good sheet to get a hold on the fundamental commands and operations.
😇
Awesome Post! Thank you.
The cheat sheet would have gone in an ascending order. Starting with the very basic element in the cheat all the way to the hardest. It makes things easier to understand.