O'Reilly logo

Joe Celko's Thinking in Sets: Auxiliary, Temporal, and Virtual Tables in SQL by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.3. Functions

Before pocket calculators became cheap and powerful, we used lookup tables in books. Go to a used bookstore, pick up an old finance, trig, or statistics book, and look in the back. There will be tables of functions for net present value, sine and cosine, and assorted statistical tests. The most famous book was CRC Standard Mathematical Tables and Formulae for tables. The 31st edition was published in 1995, which gives you an idea how long it has been around. You can now get it on a CD.

The obvious question is why I would want to implement a function as a lookup table when I have fast, cheap computing power. One good reason is that if you only use a few thousand values of the function, they will fit into main storage, where they ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required