Databases Reference
In-Depth Information
Incorrect Values
In Exhibit 27-7, our hypothetical data warehouse draws information
from both Files “D” and “E”:
• Although the
Avg Salary
should have been the result of dividing the
To-
, somehow a mistake was made for Depart-
ment 40, as 125000/2 = 62500, not 65000. Derived or calculated data
can be in error within the same record, or file.
• Although the
tal Salary
by the
Total Staff
columns in File “E” were intended to sum the data
of File “D,” a calculation mistake was made in the
Total
(of expe-
rience) for Department 30 (should be 9, not 8). Thus derived or sum-
mary data in one file can also be incorrect based upon the data in a
completely different file.
• These types of erroneous values can easily corrupt other results —
For example, there may be a field in a third file containing the differ-
ence in average wages between men and women. Depending upon
whether File “E” is used for source data (
Total Years
Avg Salary
), the resulting cal-
culation may be accurate, or not.
Exhibit 27-7. Example of incorrect values.
Data File “D”
Last Name
First Name
Department
Yrs Employed
Salary
Smith
Fred
40
2
50000
Smith
Sid
40
3
75000
Lee
Tom
30
3
60000
Yu
Robert
50
1
45000
Yu
Ted
30
6
80000
Data File “E”
Total
Salary
Total
Staff
Department
Total Years
Avg Salary
30
8
140000
2
70000
40
5
125000
2
65000
50
1
45000
1
45000
Referential Integrity Violations
Referential integrity is a constraint to ensure that relationships between
rows of data exist, and in particular that one row of data will exist if another
does (generally in different tables).
 
Search WWH ::




Custom Search