Hbase 和 1-多关系
我有一个问题,可以用以下场景来最好地描述。
假设我有三个表 BaseCategory、Category 和 products。如果我从 RDBMS 的角度思考,那么这些表之间的关系是
1-一个 BaseCategory 有许多类别 2-一类有多种产品。
现在我正在考虑将其转换为HBase。有人能帮我如何将这些关系映射到 HBase 中吗?
I have one question which can be best described by the following scenario.
Suppose I have three tables BaseCategory,Category and products. If i am thinking in terms of RDBMS then the relationship amoung these tables are
1- One BaseCategory has Many categories
2- One Category has Many Products.
Now i am thinking to convert it into HBase. can anybody help me how to map these relations into HBase?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能会让每一行代表一个超级类别/类别对(用分隔符编码,例如 MySuperCategory:MyCategory,以及一个名为“产品”的列族,其中包含该类别中每个产品的列。
这将允许您非常快速地检索给定超类别/类别对中的所有项目,以及通过一些重复数据删除来消除超类别中的所有项目。
You'd probably have each row represent a supercategory/category pair (encoded with a separator, e.g. MySuperCategory:MyCategory, and a column family named "products" with a column for each product in that category.
This would allow you to very quickly retrieve all of the items in a given supercategory/category pair, and with some de-duplication all of the items in a supercategory.