15. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for facilitating user queries to a database, the method comprising: determining one or more search fields from query criteria generated by a user in a client-side application; automatically generating one or more query criteria templates from the determined one or more search fields by extracting search-field names, search-field data types, and search-field length from a set of user interface metadata; obtaining search-field values from the query criteria; and representing the search-field names and search-field values in XML format which can be stored in a column of the record corresponding to the one or more query criteria templates, wherein a query criteria template is a record which can be stored in a single template table; wherein the query template table comprises rows and columns, and wherein each row in the query template table corresponds to a query criteria template and comprises one or more of template name, user name, creation time, and flag type corresponding to a specific query criteria template record; and communicating the one or more query criteria templates to a database where the one or more query criteria templates can be stored in a template table.
15. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method for facilitating user queries to a database, the method comprising: determining one or more search fields from query criteria generated by a user in a client-side application; automatically generating one or more query criteria templates from the determined one or more search fields by extracting search-field names, search-field data types, and search-field length from a set of user interface metadata; obtaining search-field values from the query criteria; and representing the search-field names and search-field values in XML format which can be stored in a column of the record corresponding to the one or more query criteria templates, wherein a query criteria template is a record which can be stored in a single template table; wherein the query template table comprises rows and columns, and wherein each row in the query template table corresponds to a query criteria template and comprises one or more of template name, user name, creation time, and flag type corresponding to a specific query criteria template record; and communicating the one or more query criteria templates to a database where the one or more query criteria templates can be stored in a template table. 17. The computer-readable storage medium of claim 15 , wherein the method further comprises allowing the user to specify a name for the automatically generated one or more query criteria templates and to specify the automatically generated one or more query criteria templates to be private or public; wherein a private template is only visible to the template's creator; and wherein a public template is visible to multiple users.