Junk Dimension Flashcards

1
Q

Alter table to add a JUNKID

A

Alter table xxxDIM add (junkID number(2))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Create a Junk dimension

A

CREATE TABLE JunkDim AS SELECT DISTINCT a, b, c, d from dw.xxx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Create a tempfact table

A

Create table tempfact as select a, b, c, d from dw.xxx

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Add junkid to tempfact

A

Alter table tempfact add (junkid num(2))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Set sequence to tempfact

A

Update tempfact tf set tf.junkID = (select j. junkID from junkDIM j where j. aaa = tf.aaa and j. bbb = tf. bbb and j. ccc = tf. ccc and j. ddd = tf. ddd)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Create sequence for junkDIM

A

Create sequence junk.seq_id start with 1 increment by 1 maxvalue 99999999 minvalue 1 nocycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Update junkDIM with the ID set to sequence ID

A

update junkDIM set junkID = junk.seq_id.nextval

How well did you know this?
1
Not at all
2
3
4
5
Perfectly