Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.JS with NoSQL or SQL? [closed]

Tags:

sql

node.js

nosql

Something I'm not quite understanding, I've been doing some research for databases for Node.JS and almost everyone is recommending NoSQL type databases like MongoDB or CouchDB to use with Node.

But reading further I see that NoSQL is not that great for relational data... But that's where I'm getting confused: Most business applications (or social networking type apps) have relational data.

For example, let's say I'm building an application in Node.JS for a school that has students, teachers, classes. You can see there's alot of relationships in there. Would you still recommend using NoSQL?

like image 565
Shai UI Avatar asked Oct 06 '12 01:10

Shai UI


People also ask

Is Nodejs SQL or NoSQL?

Node. js supports all types of databases, including relational and NoSQL databases. However, Node. js NoSQL databases are the best match for most applications and company-wide use-cases.

Is Nodejs good with SQL?

Node. js typically supports all database types, regardless of whether they're SQL or NoSQL.

Which DB to use with Nodejs?

“Node. js can only be used with MongoDB (which is the most popular NoSQL database).”

Should I use MongoDB or MySQL with Nodejs?

Should I use MySQL in Node. js? If you have relational data MySQL is a superior choice to MongoDB. For simple stuff MongoDB is fine, but when trying to tie a lot of relational data together MongoDB is a nightmare.


1 Answers

MongoDB is often paired with Node.js because of their shared asynchronous nature, and because of the easy use of javascript JSON objects with the JSON based mongoDB document structure. That said, mongoDB has its shortcomings, particularly when complex reporting must be done. One of the better explanations I have found is that replicating the easy data access in mongo would require a join in mysql, however if you were to want to join the data a different way it would be rather straightforward in SQL, but much more complex in Mongo.

like image 150
Adrien Delessert Avatar answered Oct 03 '22 00:10

Adrien Delessert