Re: problem with historical data and referential integrity

From: Mikito Harakiri <mikharakiri_at_iahu.com>
Date: Fri, 17 Dec 2004 20:13:23 -0800
Message-ID: <PiOwd.34$RK1.20_at_news.oracle.com>


"--CELKO--" <jcelko212_at_earthlink.net> wrote in message news:1103210573.738459.24900_at_f14g2000cwb.googlegroups.com...
> My
> little piece on TREES & HIERARCHIES is doing very well, so "niche SQL"
> books might be a good idea instead "encyclopedia" programming books.

Should I read this as encouragement to write a competiting book? Very nice of you.

I wrote a whole page today! (With that pace it would take me ... days to complete 300 pages). I hope you enjoy reading it as much as I was writing it.



Consider splitting an interval with rational endpoints into two smaller intervals. Any point between the left and right endpoint might be good enough to the extent that we get two intervals. On the other hand, if we choose this point carelessly then one interval might be much bigger than the other one. This might be a problem from implementation perspective, because small intervals impose much stricter requirements on arithmetic's precision. For example, checking if a point 0.7453 belongs to the interval [0.3, 0.9] is much easier than if it belongs to the interval [0.743, 0.748], since we need to check 1 digit in the first case versus 3 digits in the second. Therefore, we have to find the "most economical" way of finding the point between the two.

To repeat, given 2 rational numbers, what is the simplest number between them? Most people would probably choose the arithmetic average. For example, the simplest number between 0 and ½ is ¼, the simplest number between ¼ and ½ is 3/8 and so on. If we start with the point 0 and 1 and continue on halving the intervals iteratively, then what kind of numbers would be produced? Clearly, the ones whose denominator is power of 2, or simply dyadic fractions.

Elementary school students might beg to differ. When questioned what the sum of ½ and ¼ is some suggest that the result is ½ + ¼ = (1+1)/(2+4) = 2/6 = 1/3 (*Footnote*). Ironically, their naïve approach is not without its merit. Operation of adding fractions "wrong way" is called mediant. Mediant is the simplest number between the two fractions if we use smallness of denominator as a measure of simplicity. Indeed, the average of ¼ and ½ has denominator 8 while the mediant has 3.

*Footnote*
In American educational system adding rational numbers correctly is a skill developed somewhere between middle school and college. Received on Sat Dec 18 2004 - 05:13:23 CET

Original text of this message