BigTable 与 noSQL
我可以知道“nosql”中存在像bigtable一样的限制,我们应该在其中“非规范化”我们的表/实体吗?
任何允许我们编写一次代码并可用于 Google 应用引擎 bigtable 和 nosql 的 api 包装器? (类似于 hiberanate)
may i know in 'nosql' there is limitation just like bigtable where we should 'denormalized' our table/entity ?
any api wrapper that allow we to write code once and can be used for google app engine bigtable and nosql ? (something like hiberanate)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,例如在 MongoDB 中,您没有联接,因为它是非关系,因此它确实改变了我们存储和浏览数据的方式。
似乎共识是通过非规范化和复制来加速读取,以避免将分布式数据连接在一起的成本,并在应用程序级别完成连接和合并逻辑。
至于数据库非规范化是否是绝对要求,我不确定(其他SO成员可能可以启发我们)。但我认为数据库建模时应该考虑到这些“限制”,并充分研究如何查询数据。这应该给过程带来最小的阻力。
另请参阅:
Bigtable 数据库设计理论
GAE - 如何在没有加入的情况下生活?
JDO 与数据存储无关,因此它可能只是在某种程度上提供您想要的东西。
似乎最近有很多项目将 JDO 和 JPA 与“NoSQL”产品一起使用。
参见:
Datanucleus-Cassandra
Datanucleus-Cassandra-Plugin
Yes, for example in MongoDB you don't have joins since it is non-relational, so it does change how we store and browse the data.
It seems that the consensus is to denormalize and duplicate to accelerate the reads to avoid the cost of joining distributed data all toghether, with the join and merge logic done on the application level.
As to whether it is an absolute requirement to denormalize the database, I am not sure (other SO members can probably enlighten us). But I think the database should be modeled with these "limitations" in the mind along with a good study of how the data is going to be queried. This should give the least impedance to the process.
See Also:
Bigtable database design theory
GAE - How to live with no joins?
JDO is datastore-agnostic, so it might just provide what you want to some extent.
Seems there are lots of recent projects to use JDO and JPA with "NoSQL" products.
See:
Datanucleus-Cassandra
Datanucleus-Cassandra-Plugin
虽然抽象库确实有助于可移植性,但您必须考虑正在运行的特定平台。如果您要使用 Google App Engine,则必须了解 额外的抽象库固有的启动成本。
您应该权衡使用 JDO 或 JPA 之类的利弊。另请查看 Objectify 库,它提供了更原生的界面,具有耦合到 App Engine 数据存储区的缺点。
While abstraction libraries definitely help portability, you have to take into consideration the particular platform you're running on. If you're going to go with Google App Engine, you have to be aware of the incurred startup costs inherent with additional abstraction libraries.
You should weigh the pros and cons of using something like JDO or JPA. Also take a look at the Objectify library that offers a more native interface that has the downside of being coupled to the App Engine Datastore.