HBase storage for many relationships

I reflect on the best way to implement a one-to-many relationship in HBase.

Let's say ACCOUNT has a lot of OPERATIONS. Is it better

a) Add columns to the transaction family: in the ACCOUNT table, i.e. Transactions: 1: Amount, Transactions: 2: Amount

b) Save only the keys (keys) of each transaction related to the account in the transaction: ACCOUNT column name, and search for each transaction found in a separate TRANSACTION table?

+5
source share
2 answers

Typically, option a is the best approach.

This allows you to easily request all transactions for an account at once. An additional search is not required for each transaction.

, b , , .

+5

, () , , , . , , , (b), , (a)

0

All Articles