Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Should a SCD table contain a UPI including date fields or use a natural key? - topic by dsldsl1980

$
0
0
At my new company we rarely use UPI and instead generally use a PI on 1 column and use a "Natural Key".  IE: TABLE: acct_id, acct_typ, start_dt, end_dt, cur_in, rcv_in, metric1, metric2, metric3 With a primary index of acct_id I would use a UPI on (acct_id, acct_typ, start_dt, end_dt) and my join would look something like: JOIN ON a.acct_id = b.acct_id and a.actvy_dt between b.start_dt and b.end_dt

read more


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>