re: Who's going to write us a post on alternatives to mongoose ? VIEW POST

re: Why not just plain mongodb driver for node? For me mongoose is unexplainable phenomenon - people go towards NoSQL databases, but on the other hand ...

As someone who has been using nosql type databases for years (including XML databases) in many projects, I'll say this.

The object stores (nosql dbs) gives us flexibility to store anything, right, but the structure and relationships are built into the code.

The code is the source of truth vs. whereas the database is the source of truth (relationships etc) in a SQL (relational database).

Then, at some point some odd people :D decided to use both at the same time, which is when Object Relational Mappings for SQL happened.
Which I found strange, as I think the best way to speak to a SQL database is SQL.


but ORM libraries have another advantages, other than just performing the mapping: they (usually) enure safety (there are still a lot of developers who don't use parametrized queries when going the pure SQL approach), and often they have built-in migration system. You still need to write the migrations, but the system for running them, and rolling back is there for you.

code of conduct - report abuse