Referential Integrity Flashcards

1
Q

What is Referential Integrity?

A

Lookup columns never contain null values.

Every value in a lookup column, has a match in the destination table.

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

What were the three mechanisms Caboodle uses to enforce referential integrity?

A

Negative surrogate keys. Every table has the three negative surrogate keys.

Default values. Caboodle supplies a default value (-1,-2,-3) when Source data is unavailable.

Inferred rows (with -1, *Unspecified) which act as placeholders until the relevant info is loaded into Caboodle.

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

-1 surrogate key equates to what in the source system?

A

NULL = *Unspecified

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

What does the WHERE clause look like to eliminate these negative surrogate keys?

A

WHERE ________Key > 0

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

-2 surrogate key equates to what in the source system?

A

*Not applicable (string), -2 (foreign keys)

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

-3 surrogate key

A

*Deleted

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

What kind of row is created by the ETL if the referenced row does not exist yet?

A

Inferred Row and all it’s string values are set to *Unknown

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

All Fact tables have a Count column which normally stores a 1, when will it store a 0?

A

When the rows are negative or deleted

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