Hi,
I have fact table in database as below
Column 1 : Identifier
Column2 : Measure
Column 3: Attribute 1
Column 4: Attribute 2
I want to model star schema out of this fact table as below.
Fact
-----
Identifier
Measure
Attibute 1 >> FK
DIM
-----
Attribute 1 >> PK
Attribute 2
Link Fact and DIM using Attribute 1. (1 to many relation)
Now, how do I ensure that only unique values for Attribute 1 are fetched from the fact table?
Regards
JPS
Your fact should contain merely keys (identifiers) that act as FK's for the dimension. Your exercise seems a bit academic, but creating a virtual dimension is possible by selecting the distinct set of
Attribute1 -- Attribute 2,
like:
SELECT DISTINCT AT1,AT2 FROM FACT