Question 8.8. (TCO 6) A DBA is designing a spatially-enabled database to determine the distance from a customers location at point 1 (x1, y1), to the companys distribution center at point 2 (x2, y2), in order to automatically provide the customer with a delivery cost estimate for the companys products, which are delivered by company truck, based on a fixed cost-per-mile. Using the Pythagorean Theorem, the DBA creates a shipDistance(x1, y1, x2, y2) function that uses the following formula as the basis for its calculation: shipDistance = ((x2-x1)^2 + (y2-y1)^2)^0.5 What, if any, problems will be revealed by the DBAs careful testing of this function using known points and distances to validate the softwares correct functioning? (Points : 10) | The DBA finds that long distances generate values equal to or insignificantly varying from the expected results, while short distances generate significant errors, which are increasingly inaccurate as points that lie closer together are tested. This is due to the Law of Averages, in which uncertainty tends to cancel out for large measurements, but which can be significant and skew results when measuring very small quantities. The DBA finds that short distances generate values equal to or insignificantly varying from expected results, while long distances generate significant errors, which increase with the distance. This is because the distances calculated reside on a curved surface, the earths roughly spheroidal surface, rather than points on a planar surface. Since the amount of curvature is smaller over short distances, the errors for short distances are often insignificant. The DBA finds that the distance calculation for points with large latitudinal displacement (y-variance, or North to South differences) produce significant errors, without respect to the longitudinal difference (x-variance, or East to West differences), while points with large longitudinal displacement produce no significant errors. This is because the distance between longitudinal lines becomes closer together as you move away from the equator and close to the poles. The DBA finds that testing using a result set of coordinates of varying known short and long distances is invariant from expected results. This is because the Pythagorean Theorem is universally applicable across planar and non-planar surfaces. |