MySQL 哪个数据库引擎最适合 node.js 应用程序?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19431147/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 19:09:25  来源:igfitidea点击:

Which database engine is best for node.js apps?

mysqldatabasenode.jssqlite

提问by kfasny

I am looking for a database engine which is the best for storing thousands of records. I first wanted to use MySQL, because I know it best, but I'd like to have strong answer.

我正在寻找一种最适合存储数千条记录的数据库引擎。我首先想使用 MySQL,因为我最了解它,但我想得到强有力的答案。

I need predefined columns, database can be as small as 10 MB or as "big" as 10 GB of data and it would be cool if that engine is fast for reads (insertions may be a bit slower). I don't need fast-fulltext-search or regexp searching. To give you an example - selecting items via slug extracted from link.

我需要预定义的列,数据库可以小到 10 MB 或“大”到 10 GB 的数据,如果该引擎读取速度快(插入可能会慢一点)会很酷。我不需要快速全文搜索或正则表达式搜索。举个例子 - 通过从链接中提取的 slug 选择项目。

I saw this sitebefore but I still don't know what is best option for me.

我以前看过这个网站,但我仍然不知道什么对我来说是最好的选择。

So here is my question: Which database engine is best for uses like mine?

所以这是我的问题:哪种数据库引擎最适合像我这样的用途?

采纳答案by Gates VP

database can be as small as 10 MB or as "big" as 10 GB of data

数据库可以小到 10 MB 或“大”到 10 GB 的数据

At that size, you could use virtually any database you want. Remember, 10 GBs of data is small enough to fit into memory on a modern server.

在这种规模下,您几乎可以使用任何您想要的数据库。请记住,10 GB 的数据小到足以放入现代服务器的内存中。

I need predefined columns...

我需要预定义的列...

Sounds like SQL. Take you pick: MySQL, PostgreSQL, SQLite... at that size it will barely matter, just use what you like.

听起来像 SQL。随便选:MySQL、PostgreSQL、SQLite……在这种规模下,它几乎无关紧要,只需使用您喜欢的即可。

The performance difference on a "few gigs" of data will be negligible.

“几场演出”数据的性能差异可以忽略不计。

回答by Pradeep Mahdevu

You should look at MEAN stack. Personally, I like MongoDB - I use an ORM tool like mongooseJS- It increases your development speed rapidly. The one thing i really like about having Node JS, Express body parser, mongodb and mongoose is I deal everything on the server side in one language - Javascript and I expose REST services which can be consumed on Web (typically Angular- the A in MEAN stack or backbone) based application.

你应该看看MEAN stack。就个人而言,我喜欢 MongoDB - 我使用像mongooseJS这样的 ORM 工具- 它可以快速提高您的开发速度。我真正喜欢使用 Node JS、Express body 解析器、mongodb 和 mongoose 的一件事是我用一种语言处理服务器端的所有内容 - Javascript 并且我公开了可以在 Web 上使用的 REST 服务(通常是Angular- MEAN 中的 A)基于堆栈或主干)的应用程序。

回答by glukki

Look at MongoDB.
And don't forget to look at TokuMX- it's very promising!

看看MongoDB
别忘了看看TokuMX- 它非常有前途!