本文介绍了我应该将哪个数据库与 node.js 一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

node.js 应该使用哪个数据库?我正在考虑 MySQL 和 MONGO DB.

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

推荐答案

正确答案是:视情况而定.

The correct answer is: it depends.

像许多其他编程语言一样,node 有各种数据库适配器.当然,有些比其他的要好,但它们都在快速变化和发展,以至于这里的任何陈述都会很快过时.即使选择一个数据库,也会发现至少有两三个不同质量的适配器.

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.

最终什么适合 Node 并不重要,重要的是什么适合您的项目.试图将关系问题压缩到 NoSQL 存储中对您没有好处.

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.

节点社区为您提供了很多可能性.查看节点工具箱,为 CouchDB、MongoDB、Redis、数据库抽象层、MySQL 等找到一些解决方案.您总是需要一些常识来选择正确的模块.查看提交历史、维护者数量、活动、上次提交时间戳、问题队列等.您一定会找到适合您的数据库的解决方案.

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.

当我必须同时学习多种技术时,我个人觉得这会让人不知所措.因此,如果您不熟悉 node,我宁愿坚持使用您熟悉的第一个项目的数据库.

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.

这篇关于我应该将哪个数据库与 node.js 一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 06:33