Abstract
This chapter focuses on auxiliary tables that are a way of building functions and look-up tables that would be difficult if not impossible to do with the limited computational power of SQL. Auxiliary tables serve as adjuncts to do queries via joins rather than computations and they are usually very static and constructed from an outside data source. Thus they do not require the same constraint for safety and they need to have a primary key declared so that it creates a fast access method for searching and joining the auxiliary table to other tables in the schema. The most important auxiliary table is a Calendar as the Common Era calendar is too irregular for easy computations. The Series table is a simple list of integers from 1 to (n) that is used in place of looping constructs in a procedural language. The most common form of look-up tables has two columns, one for the value to be looked up and one for the translation of that value into something the user needs. Although most auxiliary look-up tables are meant for simple decoding, they can also be used for more complex functions such as programming the Net Present Value (NPV) and its related Internal Rate of Return (IRR) in SQL.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.