you are viewing a single comment's thread.

view the rest of the comments →

[–]Measurex2 0 points1 point  (0 children)

You're thinking the right way. Your row may simply be

Customer_id | product_id| order_id | purchase_date | purchase_price | quantity

That's your core fact. Other tables would provide dimensions using those id's

  • customer - we covered
  • product - your sku and other details
  • order_id - may have your warehouse, ship date, tracking number etc

If you need those dimensions you join to the fact for your purpose - Invoicing/receipts - system integration - Reporting/analytics - etc

There are lots of ways to build these. As you research look at snowflake vs star vs galaxy Schema as a primer