Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
artopaper
Starting Member
2 Posts |
Posted - 2014-10-05 : 17:04:39
|
Hello all,I want to design my FACT table, with different dimensions but im not sure how my database diagram has to look.I have 4 tables as dimensions:DIM_campaign contains:- campaignid- campaignname- letter- names- shipDIM_orderline contains:- orderlineid- orderid- productid- date1- date 2- numunitsDIM_orders contains:- orderid- customerid- campaignid- date- etc1- etc2DIM_product contains: - productid- productnameand a FACT_sales which i want to have to contain:- All keys- numunitsHow can i achieve this? Do i need to normalise or can i hold on a star schema? |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-10-06 : 08:04:42
|
You've just described a star schema, which is typical for a OLAP database. the Fact table keys should be ints and FKs to identity columns in the DIM tables. (e.g. orderid) |
|
|
artopaper
Starting Member
2 Posts |
Posted - 2014-10-07 : 07:09:09
|
But how can i fill my fact table, with the data i got in the dimensions? DO i need to make a query for that?(Insert into?) |
|
|
|
|
|