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?
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.
Node. js typically supports all database types, regardless of whether they're SQL or NoSQL.
“Node. js can only be used with MongoDB (which is the most popular NoSQL database).”
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With