Single Table? Multiple Tables?

夔庆
2023-12-01

A traditional design approach would have separate tables for CUSTOMER and SALES. Another option is to pack multiple record types into a single table (e.g., CUSTOMER++).

Customer Record Type Rowkey:

[customer-id]

[type] = type indicating `1' for customer record type

Order Record Type Rowkey:

[customer-id]

[type] = type indicating `2' for order record type

[order]

The advantage of this particular CUSTOMER++ approach is that organizes many different record-types by customer-id (e.g., a single scan could get you everything about that customer). The disadvantage is that it’s not as easy to scan for a particular record-type.

 类似资料:

相关阅读

相关文章

相关问答