Search code examples
data-modelingdata-warehousedatamodel

How to design a database model for a large data warehouse?


Lets say I design a database model for an online seller such as Amazon:

enter image description here

Next, to create the database model for the larger data warehouse, I flatten the Order and OrderDetails tables, and flatten the Product and Vendor tables:

enter image description here

I do this to apply the concept of designing models for parent-child applications, as described here http://bit.ly/1bOuOXQ

The data in the data warehouse tables becomes repetitive:

enter image description here

Several values such as $76.30 for OrderTotal repeat on each row, is this correct? Is the model correct?


Solution

  • Each row represents a match for each product, the corresponding order subtotal and total will be identical for each row with a specific orderid.

    The result is as expected for your model definition.