1

Previous answers to this question:

Difference between MongoDB and Mongoose

Why do we need, what advantages to use mongoose

The main reason given in these answers is "schemas". Since 3.6, mongodb has introduced its own schemas:

https://docs.mongodb.com/manual/core/schema-validation/

These are more thorough and work by default on inserts and updates.

Are there any more significant reasons to use Mongoose, as that was the main one and now it seems to have been integrated into the native API. I have also noticed that mongoose is lacking various new features implemented in mongodb.

1 Answer 1

0

Mongoose, the driver I'm using right now, is much more intuitive to learn if you're a beginner. Many criticize the mongoose because they claim that the creation of collection schemes is the opposite of what was thought of the mongodb and NoSQL databases; However I think that even using the native mongoDB driver you will always have to create a minimum of schematics, even for validation and have an idea of ​​what you are entering in the database. Mangusta is extremely convenient because in addition to allowing the creation of templates, it is possible to declare methods in the document and control events. In addition, the mongoose automatically performs additional validation, and has many more search functions. The real negative point of the mongoose is performance. (On this page there is the difference in performance of the two drivers https://medium.com/@bugwheels94/performance-difference-in-mongoose-vs-mongodb-60be831c69ad) Naturally all these characteristics of the mongoose abandon the performance. It's hard to give you a driver because it's based on the kind of project you have in mind.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.