Hello,
Im trying to design a database to track products and the the monthly orders and revenue brought in by those products.
I have a 2 different table designs and am wondering which one would be better:
1)
Product Table
--------------
PK-ProductID
ProductName
ProductManufacturer
Data Table
---------------
PK-DataID
FK-ProductID
Date
Orders
Revenue
2)
Product Table
--------------
PK-ProductID
ProductName
ProductManufacturer
Orders Table
--------------
OrderID
FK-ProductID
OrderDate
Orders
Revenue Table
--------------
RevenueID
FK-ProductID
RevenueDate
Revenue
So #1 seems better to me, but should orders and revenue be separated out just because they are two different things?
The orderDate and RevenueDate will always be the same (one date, one order number and one revenue number per month)
Or should orders and revenue get their own table? This seems like it would make more complicated queries down the road if I just wanted revenue information for example
PS: I'm going to have several other data tables similar to revenue and orders that will have a many to 1 relationship with product, I just put these two as an example...also, I should note that there will be millions of records...