Hbase 和 1-多关系

发布于 2024-09-15 10:20:53 字数 201 浏览 1 评论 0原文

我有一个问题,可以用以下场景来最好地描述。

假设我有三个表 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

看透却不说透 2024-09-22 10:20:53

您可能会让每一行代表一个超级类别/类别对(用分隔符编码,例如 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文