Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Creating surrogate keys

0 views
Skip to first unread message

Abegail S. Aquino

unread,
Sep 5, 2002, 9:22:16 PM9/5/02
to
Hi,

Can somebody please help me to create a stored that
automatically creates surrogates keys for my dimension
tables and my fact table?

To illustrate:
The fact tables' link to my Product Dimension is composed
of the following fields: FieldA,FieldB,FieldC,FieldD and
FieldE. Initially, I created another column that combines
this 5 fields together and assigned as my PRODUCT_KEY in
the fact table. Similarly, when I build my Product
Dimension, I have created a PRODUCT_KEY that is also a
combination of those 5 columns. I figured that the
relationship would be easier.

What I want to do:
I want to create surrogate keys like assigning and
Identity column to the PRODUCT_KEY that I have created
both in the Fact Table and the Product Table. This way,
the primary key will be clustered index on a numeric data
type which in all articles I have read will be best for
optimization.

Appreciate any inputs..
Thank you very much

0 new messages