Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which database should I use with node.js? [closed]

Which database should I use with node.js? I'm condering MySQL and MONGO DB.

like image 807
Ravinder Singh Avatar asked Jan 10 '13 19:01

Ravinder Singh


2 Answers

The correct answer is: it depends.

Like many other programming languages node has various adapters for databases. Ture, some are better than others, but they are all changing and evolving so fast that any statement here would be outdated soon. Even if you select one database, you will find at least two or three adapters with different qualities.

In the end it does not really matter what is a good fit for Node, but what is a good fit for your project. Trying to squeeze a relational problem into a NoSQL storage will do you no good.

The node community provides you with lots of possibilities. Take a look at the Node Toolbox to find some solutions for CouchDB, MongoDB, Redis, Database abstraction layers, MySQL, … As always you need a bit of common sense to choose the right module. Look at commit history, how many maintainers, activity, last commit timestamp, issue queue, etc. You will surely find a solution for a database that you are comfortable with.

I personally find it rather overwhelming when I have to learn more than one technology at once. So if you are new to node, I would rather stick to a database you know for your first project.

like image 174
topek Avatar answered Nov 18 '22 02:11

topek


Every one has different requirements for completion so it really depends on what you are trying to do. Like Joseph said MongoDB and Node.js works really well together but for certain use case, MySQL could probably be a better choice. Also, you might want to considered the database you are the most comfortable with. Personnaly, I would recommand MongoDB but I think it's a matter of preference.

like image 20
Jean-Philippe Bond Avatar answered Nov 18 '22 03:11

Jean-Philippe Bond