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
 SQL Server 2000 Forums
 Analysis Services (2000)
 star schema only ONE foreign key?

Author  Topic 

heze
Posting Yak Master

192 Posts

Posted - 2007-03-01 : 18:04:14
Hi,

Im starting to delve in AS 2000.
Im building a star shema scenario
My question is:
In the star schema(targeted for AS), up to what Ive read, when a dimension table D and a fact table F are related by a PRIMARY-FOREIGN keys respectively, does this relation has necessarilty consist of ONE field? or can we have more than one fields related in tables F and D?
ex
D(id(PRIMARY KEY),year field1...fieldn )
F(id(FOREIGN KEY REFERENCES D(id)),myMeasure)

or
can we do the folloiwng:
D( id(PRIMARY KEY),year(PRIMARY KEY) , field1...fieldn )
F(id(FOREIGN KEY REFERENCES D(id)),year(FOREIGN KEY REFERENCES D(year)),myMeasure)

thank you
   

- Advertisement -