MongoDB,MySQL和PostGreSQL的比较 [英] Comparison of MongoDB, MySQL and PostGreSQL

查看:1376
本文介绍了MongoDB,MySQL和PostGreSQL的比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我必须开发


  1. 可处理CSV文件并将输出存储在开源数据库中的核心Java应用程序

  2. 最初的数据大小为10 GB(从现有来源移植)

  3. 将以每月1 GB的速度增长

  4. 一个典型的事务可以获取100,000行

  5. 在给定时间可以被1000个用户访问

  1. Core Java application which processes CSV files and stored output in a Open-source DB
  2. Data size would be 10 GB initially (porting from existing sources)
  3. Would grow at 1 GB per month
  4. A typical transaction could fetch 100,000 rows
  5. Could be accessed by 1000 users at a given time

并选择了


  1. Mongodb

  2. MySQL

  3. PostGresql

这将是数据库的最佳选择?

which would be the best choice of DB ?

< a href = http://java.dzone.com/articles/when-use-mongodb-rather-mysql rel = nofollow>这将MongoDB与MySQL进行了比较

这将PostgreSQL与MySQL进行了比较

针对MongoDB的安全警报

推荐答案

随着最好是拥有一个易于扩展的数据库,而SQL却无法平滑扩展并最终破坏了它的执行能力,实际上,通常对于大数据,仅使用高可扩展性数据库。
但是您说过条目之间可以相互关联,因此在这种情况下最好使用关系数据库,因为NO-SQL可以丢失某些关联。
就像@Craig Ringer所说的那样,不要仅仅考虑那些DB,有很多不同的解决方案都有自己的优缺点(例如redis非常快,但是几乎没有任何复杂的逻辑,因为它是简单的键值存储,或者说Cassandra比Mongo更快,但是对计划数据则更好,Mongo是一个文档数据库,因此可以在同一Collection中存储任何类型的数据。)

With increasing data it's better to have a DB that scale easly and SQL doesn't scale smoothly and eventually breaks doing it, in fact usually for Big Data only High scalable DB are used. But you said that entries can have correlation with each other so in this case it's better to use a relational DB because the NO-SQL ones can "lose" some correlation. Like @Craig Ringer said don't consider only those DBs there are a lot of different solutions who has their own pros and cons ( for example redis is very very fast but it's almost without any kind of complex logic because it's a simple Key-Value storage, or Cassandra is faster than Mongo but works better with schemed data, Mongo is a documental DB so can store any kind of data in the same Collection ).

恕我直言,您应该尝试使用不同的数据库和用例设置一些基准测试会议,并专注于您希望快速完成的工作,然后在该字段中选择更好的。

IMHO you should try to set up some bench marking sessions with different DB and Use case and focus on what you want to be done fast and then choose the better in that field.

这篇关于MongoDB,MySQL和PostGreSQL的比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆