1

Using MongoDB/CouchDB or any document based DB have a great and extensive documentation with Node.js. However, SQL usage (both raw and with ORMs) with Node have significantly less documentation and community backing. Why do very few people (at least on tutorials, public projects) use Node.js with SQL or ORMs in comparison to those who uses NoSQL?

All I see for Node.js is the MEAN stack and various NoSQL set ups (bundled in things like meteor). It's very strange for me to see so little content and a very small community working on Node and SQL. Although ORMs have performance drawbacks, I also hear a lot of drawbacks of using non-relational databases (like startups failing, etc) as opposed to SQL's reliability and age, plus ORMs solve the Object-Impedence mismatch issue.

I had to use SQL on a Node project and to cope with this, I used the most popular Node ORM Sequelize to map my JavaScript code to SQL queries so that I could focus on using one language, but the documentation and community is lacking and as a result it took a lot of time for me to discover how to use it in simple ways that would take me minutes on MongoDB.

Are Node and SQL not meant to work together?

Zanon
  • 29,231
  • 20
  • 113
  • 126
Natu Myers
  • 486
  • 2
  • 4
  • 21

1 Answers1

1

For comparison, release dates:

Oracle: 1979
Java: 1995
Node: 2009
MongoDB: 2009

Node is a new technology that is often used with other new concepts and trending architectures. There is nothing wrong in using ORM/RDMS with Node, but usually, when a big company migrates to develop new systems with Node or a startup decides to build things with Node, they are also willing to try new architectures and solutions like NoSQL, memory databases, cloud services, etc.

RDBMSs are stable, powerful, you can build things with less risks and have more experienced developers in the market, but is an old technology. As a traditional technology, its more common to be accompanied with other traditional programming languages.


Also, Node uses JavaScript that have the best JSON support, which is great for NoSQL databases and JavaScript is untyped/weakly typed language, which creates some small issues to use ORM tools.

Community
  • 1
  • 1
Zanon
  • 29,231
  • 20
  • 113
  • 126
  • Oracle Database has JSON datatype support http://docs.oracle.com/database/121/ADXDB/json.htm#ADXDB6246 – Christopher Jones Apr 06 '16 at 02:17
  • It's from 2014, I guess. Postgres also supports JSON and SQL Server will support it in vNext. However, providing support doesn't mean necessarily that the feature is as good as in MongoDB. Also, it needs more advertisement since people would avoid testing a NoSQL approach from a company that is specialized in Relational. – Zanon Apr 06 '16 at 11:29
  • Thanks for the edit and thanks for the background – Natu Myers Apr 07 '16 at 20:42