Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Why do we need mongoose in node.js?


Asked by April Andrade on Dec 08, 2021 Node.js



Elegant MongoDB object modeling for Node.js Let's face it, writing MongoDB validation, casting and business logic boilerplate is a drag. That's why we wrote Mongoose. Mongoose provides a straight-forward, schema-based solution to model your application data.
Next,
The name Mongo is a slice of the word humongous. The database has its roots in the frustrations of Dwight Merriman, Eliot Horowitz, and Kevin Ryan, who co-founded MongoDB in NYC in 2007 after they struggled to build web-scale applications for DoubleClick, one of the pioneers of digital advertising technology that eventually became a part of Google.
In this manner, MongoDB doesn't support JOIN operation . On the opposite, it supports multi-dimensional data types such as arrays and other documents. The position of one document inside another is called as embedding. While one of the best thing about MySQL is the JOIN operations.
In fact,
By contrast, MongoDB does not have a native REST interface. It can be a little confusing because while there is no native support, there are third party open source wrappers written in other languages (Node, Python, but sadly no .NET).
Besides,
A record in MongoDB is a document, which is a data structure composed of field and value pairs. The values of the fields may include other documents, arrays, and arrays of documents (a group of documents is a collection, such as a table in RDBMS).