用于社交网站的 MongoDB 还是 couchDB?
我对 nosql DB 印象深刻,并且真的希望在我的应用程序中使用 MongoDB,
但我觉得它对于连接(连接 3 或 4 个表)、联合之类的东西有限制。
是否可以将 MongoDB 用于 Tagged、FB 等社交网站...
不知道 couchDB...任何人都可以指导我,
谢谢,
Edvin
Im so impressed with nosql DB's and really wish to use MongoDB for my application,
But i feel like its limited for joins [joining 3 or 4 tables], union kinda things.
Is it possible to use MongoDB for social networking sites like Tagged,FB etc..
no idea about couchDB... any one guide me through,
Thanks,
Edvin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然,您可以将 MongoDB 用于任何应用程序。但是,如果您担心缺乏执行连接等操作的能力,那么您应该认真考虑坚持使用基于 SQL 的解决方案。
MongoDB 不是一个关系数据库管理系统。从联接和其他常见关系概念的角度思考并不是特别适合 noSQL。 MongoDB 实质上更加“混合”或“SQLish”,因为它允许您进行某种形式的跨文档查询,但在实践中应该避免这样做,而不是重新考虑数据建模方式。
对于像 MongoDB 这样的面向文档的数据库,在大多数情况下最常见(也是最佳)的做法是简单地嵌入文档。在 mongo 站点上有一篇很好的 关于 schema 的文章设计来帮助您思考嵌入文档和引用文档之间的区别。
noSQL 可以是一个非常强大的工具,但在实施之前您应该仔细考虑您的数据如何适合 noSQL 模型。并且,请确保您仔细考虑使用一种数据库解决方案相对于另一种数据库解决方案的利弊。
You can use MongoDB for any application, of course. However, if you're concerned about lack of ability to do things like joins then you should seriously consider sticking with SQL based solutions.
MongoDB is not a relational database management system. Thinking in terms of joins and other common relational concepts is not something that's particularly well suited for noSQL. MongoDB is substantially more "hybrid" or "SQLish" in the sense that it will allow you to do some form of cross document querying, but in practice it should be avoided in preference to rethinking the way you model your data.
The most common (and best) practice in most situations for a document-oriented database like MongoDB is to simply embed the documents. There's a nice write up on the mongo site about schema design to help you think about the difference between embedding and referencing documents.
noSQL can be a very powerful tool, but you should think carefully about how your data fits the noSQL model before implementing. And, make sure you think through the pros and cons of using one database solution over another.
是的,为什么不呢,它可以与其他数据中心进行集群或复制。
而且它非常快..只有当你想使用自动增量ID时,你必须使用像twitters雪花这样的东西..
对于连接,你可以使用数据模型来创建具有3或4个查询的连接
Yes why not, it can be clustered or replicated with other datacenters.
And its very fast.. only you if you want to use auto incremental id's you have to use something like twitters snowflake..
For the joins you can use data models to create the join with 3 or 4 queries