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.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Design database diagram

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
- ship
DIM_orderline contains:
- orderlineid
- orderid
- productid
- date1
- date 2
- numunits
DIM_orders contains:
- orderid
- customerid
- campaignid
- date
- etc1
- etc2
DIM_product contains:
- productid
- productname

and a FACT_sales which i want to have to contain:
- All keys
- numunits

How 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)
Go to Top of Page

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?)
Go to Top of Page
   

- Advertisement -