Structured Query Language (SQL) - Cultural View of Technology
Structured Query Language (SQL) - Cultural View of Technology
Structured Query Language (SQL) - Cultural View of Technology
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
XLeratorDB 122<br />
XLeratorDB requires Micros<strong>of</strong>t <strong>SQL</strong> Server 2005 or <strong>SQL</strong> Server 2005 Express editions, or later (compatibility<br />
mode 90 or higher). [9] The product installs with PERMISSION_SET=SAFE. SAFE mode, the most restrictive<br />
permission set, is accessible by all users. Code executed by an assembly with SAFE permissions cannot access<br />
external system resources such as files, the network, the internet, environment variables, or the registry. [10]<br />
Functions<br />
In computer science, a function is a portion <strong>of</strong> code within a larger program which performs a specific task and is<br />
relatively independent <strong>of</strong> the remaining code. As used in database and spreadsheet applications these functions<br />
generally represent mathematical formulas widely used across a variety <strong>of</strong> fields. While this code may be<br />
user-generated, it is also embedded as a pre-written sub-routine in applications. These functions are typically<br />
identified by common nomenclature which corresponds to their underlying operations: e.g. IRR identifies the<br />
function which calculates Internal Rate <strong>of</strong> Return on a series <strong>of</strong> periodic cash flows.<br />
Function uses<br />
As sub-routines functions can be integrated and used in a variety <strong>of</strong> ways, and in a wide variety <strong>of</strong> larger, more<br />
complicated applications. Within large enterprise applications they may, for example, play an important role in<br />
defining business rules or risk management parameters, while remaining virtually undetected by end users. Within<br />
database management systems and spreadsheets, however, these kinds <strong>of</strong> functions also represent discrete sets <strong>of</strong><br />
tools; they can be accessed directly and utilized on a stand-alone basis, or in more complex, user-defined<br />
configurations. In this context, functions can be used for business intelligence and ad hoc analysis <strong>of</strong> data in fields<br />
such as finance, statistics, engineering, math, etc.<br />
Function types<br />
XLeratorDB uses three kinds <strong>of</strong> functions to perform analytic operations: scalar, aggregate, and a hybrid form<br />
which WestClinTech calls Range Queries. Scalar functions take a single value, perform an operation and return a<br />
single value. [11] An example <strong>of</strong> this type <strong>of</strong> function is LOG, which returns the logarithm <strong>of</strong> a number to a specified<br />
base. [12] Aggregate functions operate on a series <strong>of</strong> values but return a single, summarizing value. An example <strong>of</strong><br />
this type <strong>of</strong> function is AVG, which returns the average <strong>of</strong> values in a specified group. [13]<br />
In XLeratorDB there are some functions which have characteristics <strong>of</strong> aggregate functions (operating on multiple<br />
series <strong>of</strong> values) but cannot be processed in <strong>SQL</strong> CLR using single column inputs, such as AVG does. For example,<br />
irregular internal rate <strong>of</strong> return (XIRR), a financial function, operates on a collection <strong>of</strong> cash flow values from one<br />
column, but must also apply variable period lengths from another column and an initial iterative assumption from a<br />
third, in order to return a single, summarizing value. WestClinTech documentation notes that Range Queries specify<br />
the data to be included in the result set <strong>of</strong> the function independently <strong>of</strong> the WHERE clause associated with the<br />
T-<strong>SQL</strong> statement, by incorporating a SELECT statement into the function as a string argument; the function then<br />
traps that SELECT statement, executes it internally and processes the result. [14]<br />
Some XLeratorDB functions that employ Range Queries are: NPV, XNPV, IRR, XIRR, MIRR,<br />
MULTINOMIAL, and SERIESSUM. Within the application these functions are identified by a "_q" naming<br />
convention: e.g. NPV_q, IRR_q, etc. [15]