7. A system for generating a database query based on a query template comprising a plurality of query language keywords, a plurality of variables, and a plurality of template-tokens, the system comprising: means for receiving one or more values each associated with a respective one of the plurality of variables; and means for transforming the query template into the database query based on the one or more values, the plurality of variables, and the plurality of template-tokens, wherein the template-tokens include an optional-section token defining a query-template-section and associated with one or more of the plurality of variables, and the means for transforming the template query into the database query comprises: means for processing each of said plurality of template-tokens, said means for processing performing processing including determining whether the template-token being processed is an optional-section token; in response to a determination that the template-token being processed is not an optional-section-token, replacing the token with a portion of a database query; and in response to a determination that the template-token being processed is an optional-section token, determining whether all of said plurality of variables associated with the query-template section are associated with a null value; means for replacing the token with a portion of a database query based on a value of one or more variables from among said plurality of variables associated with the query-template section in response to determining that not all of said plurality of variables associated with the query-template section are associated with a null value; and means for omitting the query-template-section from the database query in response to determining that all of said plurality of variables associated with the query-template section are associated with a null value.
7. A system for generating a database query based on a query template comprising a plurality of query language keywords, a plurality of variables, and a plurality of template-tokens, the system comprising: means for receiving one or more values each associated with a respective one of the plurality of variables; and means for transforming the query template into the database query based on the one or more values, the plurality of variables, and the plurality of template-tokens, wherein the template-tokens include an optional-section token defining a query-template-section and associated with one or more of the plurality of variables, and the means for transforming the template query into the database query comprises: means for processing each of said plurality of template-tokens, said means for processing performing processing including determining whether the template-token being processed is an optional-section token; in response to a determination that the template-token being processed is not an optional-section-token, replacing the token with a portion of a database query; and in response to a determination that the template-token being processed is an optional-section token, determining whether all of said plurality of variables associated with the query-template section are associated with a null value; means for replacing the token with a portion of a database query based on a value of one or more variables from among said plurality of variables associated with the query-template section in response to determining that not all of said plurality of variables associated with the query-template section are associated with a null value; and means for omitting the query-template-section from the database query in response to determining that all of said plurality of variables associated with the query-template section are associated with a null value. 12. The system of claim 7 , wherein the template-tokens include a descriptor-token associated with a data field of the database, and the means for transforming the query template into the database query comprises: means for replacing the descriptor-token with an identification of the associated data field in response to determining one or more of the values received are associated with the data field.