mongo 作为复杂项目的主数据库
在具有大量实体(50+)相互连接的系统中使用 mongodb 是否有任何意义,例如在 CRM 中。有什么“成功案例”吗?
对于某种分析系统,需要大量的记录和快速的选择。
Is there any sense to use mongodb in a system with great amount of entities (50+) connected to each other, for example in CRM. Any "success stories"?
There is a need of intensive writing and fast selection from high number of records for the some kind of analytics system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于这样一个悬而未决的问题,很难提供建议;但是,您可以分析 MongoDB 相对于其他数据库的一些优势,很可能您正在考虑将 Mongo 作为 Oracle 或 SQL Server 等关系数据库的替代品。
从 http://mongodb.org 可以看到主要特征...
面向文档的存储< /strong>:这基本上意味着您可以拥有一个或多个表示数据结构的文档。这里一个非常重要的想法是架构是动态的,也就是说您可以添加更多属性而无需更改数据库。对于增加系统的灵活性非常有用。
完全索引支持:我们不会期望对索引有任何低于完全的支持,对吧?
复制和高可用性;分片:对于可用性、灾难恢复以及保证
随系统一起成长的能力。
查询:同样,这是非常关键的要求。需要确保您考虑了动态模式。您需要考虑
您询问某些属性并未为所有文档定义
(还记得动态模式吗?)。
Map/Reduce:非常有用
分析。推荐用于聚合大量数据。
应该离线使用,这意味着您不会针对某个对象运行实时查询
map/reduce 功能,否则你会坐一会儿
等待。但在您的系统上运行批量分析非常棒。
GridFS:存储二进制数据的好方法。自动为您的文件生成 MD5,将它们分割成块,并且可以添加
元数据。您的文件将保留在数据库中。
此外,地理位置指数也很棒。您可以定义 lon、lat 属性并对这些属性进行搜索。
现在由您来决定这些功能是否适合您的需求,或者您宁愿继续使用众所周知的关系系统。
在开始解决方案之前,您应该尝试并构建一些原型。您很早就会看到设计中会遇到哪些挑战。
希望这有帮助。
It is definitely hard to provide a recommendation with such open question; however, you can analyze some of the advantages of MongoDB over other database, most likely you are considering Mongo as an alternative to a relational database like Oracle or SQL Server.
From http://mongodb.org you can see the main characteristics...
Document Oriented Storage: Which basically means you can have a single or multiple documents representing your data structures. One very important think here is that the schema is dynamic, that is you can add more attributes without having to change your database. Pretty useful for adding flexibility to your system.
Full index support: We wouldn't expect any less than full support for indices, right?
Replication and High availability; Sharding: Very critical elements for availability, disaster recovery, and to guarantee the
ability to grow with your system.
Querying: Again, pretty critical requirement. Need to make sure you account for the dynamic schema. You will need to consider in
your queries that some attributes are not defined for all documents
(remember dynamic schema?).
Map/Reduce: Very useful for
analytics. Recommended for aggregating large amounts of data.
Should be used offline, meaning, you don't run a live query against a
map/reduce function, otherwise you will be sitting for a while
waiting. But it is great to run batch analytics on your system.
GridFS: A great way of storing binary data. Automatically generates MD5's for your files, splits them in chunks, and can add
metadata. Your files will stay with your database.
Also, the Geolocation indices are great. You can define lon,lat attributes and do searches on those.
Now it is up to you to see if these features are good for your needs, or you rather stay with a well know relational system.
Before jumping into a solution you should experiment and build some prototypes. You will see very early what challenges you'll have in your design.
Hope this helps.