#Choosing the Right ORM for MongoDB

3 messages · Page 1 of 1 (latest)

crimson minnow
#

That's a question that can have multiple answers in function of the developer that answer to you and its personal experience.

For me Mongoose is a good option to use with Nestjs. We use it at work and it is logically a good fit to handle the communication with MongoDB. I don't really have significative experiences with Prisma so I don't have interesting comparison to make with Mongoose unfortunately.

ancient shadow
#

Do you need to use mongo? If you need relations, then it's best to use a relational database (duh). Otherwise it's better to use multiple queries with mongo, or use embedded documents. Relationships will always be pain with nosql, as the paradigm is completely different.

#

ORMs are useful for SQL, for mongo, I would recommend mongoose (maybe with typegoose to define schemas using classes), but any other ORM will only offer a subset of features that mongo offers, because they're built with relational databases in mind and then just retrofitted to mongo, so they can claim they "support" it, while offering an inferior experience.