`
zhuzhiguosnail
  • 浏览: 107477 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

什么时候用MongoDB?

阅读更多

NoSQL products (and among them MongoDB) should be used to meet challenges. If you have one of the following challenges, you should consider MongoDB:

  • You Expect a High Write Load MongoDB by default prefers high insert rate over transaction safety. If you need to load tons of data lines with a low business value for each one, MongoDB should fit. Don't do that with $1M transactions recording or at least in these cases do it with an extra safety.
  • You need High Availability in an Unreliable Environment (Cloud and Real Life) Setting replicaSet (set of servers that act as Master-Slaves) is easy and fast. Moreover, recovery from a node (or a data center) failure is instant, safe and automatic
  • You need to Grow Big (and Shard Your Data) Databases scaling is hard (a single MySQL table performance will degrade when crossing the 5-10GB per table). If you need to partition and shard your database, MongoDB has a built in easy solution for that.
  • Your Data is Location Based MongoDB has built in spacial functions, so finding relevant data from specific locations is fast and accurate.
  • Your Data Set is Going to be Big (starting from 1GB) and Schema is Not Stable Adding new columns to RDBMS can lock the entire database in some database, or create a major load and performance degradation in other. Usually it happens when table size is larger than 1GB (and can be major pain for a system like BillRun that is described bellow and has several TB in a single table). As MongoDB is schema-less, adding a new field, does not effect old rows (or documents) and will be instant. Other plus is that you do not need a DBA to modify your schema when application changes.
  • You Don't have a DBA If you don't have a DBA, and you don't want to normalize your data and do joins, you should consider MongoDB. MongoDB is great for class persistence, as classes can be serialized to JSON and stored AS IS in MongoDB. Note: If you are expecting to go big, please notice that you will need to follow some best practices to avoid pitfalls.
分享到:
评论

相关推荐

    MongoDB实例

    该文件是学习时候使用.附MongoDB运行程序!

    springmvc-mongodb-maven结合

    springmvc-mongodb-maven结合,spring4 mongodb3,在写的时候,遇到最多的问题就是spring版本与mongodb版本不兼容,整个demo出来给大家参考吧

    MongoDB服务安全加固1

    2.漏洞成因在刚安装完毕的时候MongoDB都默认有一个admin数据库,此时admin数据库是空的,没有记录权限相关的信息 3.漏洞自查如果您是MongoDB

    MongoDB权威指南(中文版)高清

    1037.5 数据库引用 1047.5.1 什么是DBRef 1047.5.2 示例模式 1047.5.3 驱动对DBRef的支持 1057.5.4 什么时候该使用DBRef呢 106第8章 管理 1078.1 启动和停止MongoDB 1078.1.1 从命令行启动 1078.1.2...

    mongobooster mongodb管理工具,好用

    mongobooster是一款运用MongoDB数据库可视化操作的辅助工具,在MongoDB数据库中,开发数据和利用数据库用到可视化的地方很多,所谓的可视化就是可以帮助用户使用程序的时候更加清晰,以图形的形式显示数据的每一个...

    电子书:MongoDB权威指南(中文版)

    1027.4.3 安全性 1037.5 数据库引用 1047.5.1 什么是DBRef 1047.5.2 示例模式 1047.5.3 驱动对DBRef 的支持 1057.5.4 什么时候该使用DBRef 呢 106第8 章 管理 1078.1 启动和停止MongoDB 1078.1.1 ...

    mongodb入门时候文档

    早年整理的mongodb的文档,有兴趣可以看一下,最好去看官网

    MongoDb数据结构详解.pdf

    从上图可以看出系统⾃带的三个数据库,local,admin,test,在加⼊⼀条记录的时候,会⾃动⽣成_id的⾃动标识。 我们再添加图⽚,可以使⽤mongoVUE添加,如下图所⽰。 Collections:在mongodb中叫做集合,是⽂档的...

    mongodb3.4测试过后可以安装

    自己在本地win下安装window,在官网上好不容易下载了最新版本的,可是在安装最后一步的时候老是卡住,3.4版本的就可以正常安装。

    MongoDB中唯一索引(Unique)的那些事

    缺省情况下,MongoDB的_id字段在创建集合的时候会自动创建一个唯一索引。本文主要描述唯一索引的用法。 关于什么是索引以及唯一索引这里就不做说明了,不清楚的可以自行谷歌或者百度。是什么引起我写这篇文章呢,这...

    docker下部署mongodb

    详细介绍了在docker下部署mongodb的方法以及启动命令及设置容器开机自启动的命令。文章末还介绍了“当使用docker容器的时候有可能出现以下情况:IPv4转发已禁用”解决方法。

    nodejs+express+mongodb+bootstrap+jquery+ejs写的电影demo

    自己电脑需要安装mongodb数据库 和mongoose ,自己在用的时候,记得要和对应数据库和表名一致

    mongodb-linux-x86 3.2.0

    mongodb 3.2.0 官网的 linux 源代码的, 适合被封的时候的一个下载点

    MongoDB增删改查工具类

    MongoDB增删改查工具类,根据一个doc,来检索,当doc是空的时候检索全部 检索全部并返回迭代器 便利迭代器FindIterable /** * Dao 层接口 * */ public interface MongoDao { /** * Get Data BY ID * * @...

    Linux下32位mongodb安装包

    Linux下32位Mongodb安装包,32位安装的时候可能会出现一些小问题,详细的安装过程可以参考:http://coderschool.cn/1709.html

    mongodb-win32-x86_x64-2008plus-3.0.9

    开源数据库mongodb, mongodb-win32-x86_x64-2008plus-3.0.9, 亲测可用。具体使用,清参考windows下安装说明。 注意安装的时候,要预留4G左右的磁盘可用空间,初始化的时候,需要检测的。

    mongodb-test:mongodb入门测试

    提示"[initandlisten] waiting for connections on port 27017"的时候说明正常启动成功 此时数据库已经启动 命令行模式下测试mongodb( 测试数据库名:clary ) 进入mongodb命令行模式 cmd命令行下执行mongo进去...

    Mongodb的并发访问性能测试的java客户端

    这个客户端实现了对mongoDB数据库的并发访问及访问性能测试。包括查询,修改和插入性能。用户使用该客户端的时候需要修改mongodb的ip地址和端口号,以及数据库名称和collection名称。

    mongodb-windows-x86_64-2008plus-3.0.9

    开源数据库mongodb, mongodb-windows-x86_x64-2008plus-3.0.9, 亲测可用。具体使用,清参考windows下安装说明。 注意安装的时候,data目录大概要预留4G左右的磁盘可用空间,初始化的时候,需要检测的。 安装时,...

    dbeaver21.1-enterprise-agent用于连接MongoDB等NoSQL类型数据库

    dbeaver21.1-enterprise-agent

Global site tag (gtag.js) - Google Analytics