19. An apparatus for facilitating user queries to a database, comprising: a processor; a memory; a database; a determining mechanism configured to determine one or more search fields from query criteria generated by a user in a client-side application; a template-generating mechanism configured to automatically generate one or more query criteria templates from the determine 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 an XML format which can be stored in a column of the record corresponding to the one or more query criteria templates; a storage mechanism configured to store the one or more query criteria templates in a single template table in the database, wherein the query template table comprises rows and columns, 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 wherein a query criteria template contains information on search-field names and search-field values for a query; a populating mechanism configured to populate a query form with appropriate search-field values; and a selection mechanism configured to allow a user to select a template from the stored templates prior to performing a query, thereby reducing manual entry of search-field values for similar queries.
19. An apparatus for facilitating user queries to a database, comprising: a processor; a memory; a database; a determining mechanism configured to determine one or more search fields from query criteria generated by a user in a client-side application; a template-generating mechanism configured to automatically generate one or more query criteria templates from the determine 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 an XML format which can be stored in a column of the record corresponding to the one or more query criteria templates; a storage mechanism configured to store the one or more query criteria templates in a single template table in the database, wherein the query template table comprises rows and columns, 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 wherein a query criteria template contains information on search-field names and search-field values for a query; a populating mechanism configured to populate a query form with appropriate search-field values; and a selection mechanism configured to allow a user to select a template from the stored templates prior to performing a query, thereby reducing manual entry of search-field values for similar queries. 23. The apparatus of claim 19 , further comprising: a receiving mechanism configured to receive a query to retrieve one or more templates selected by the user; a retrieval mechanism configured to retrieve a template selected by the user; and a communication mechanism configured to communicate the retrieved template to a middle-tier server or a client, thereby allowing the template to be parsed.