Patent ID: 7873611

Claim:
A computer implemented method, comprising: in response to a query statement for accessing a relational database, generating, by a query analyzer, a syntax tree representing semantic information of the query statement, the query statement having a boolean parameter without specifying a data type of the boolean parameter; predicting, by a data type predictor, a data type of the boolean parameter based on the semantic information obtained from the syntax tree in view of a structure representing the syntax tree, wherein the boolean parameter is configured to be either a numeric value or a string dependent upon metadata that defines one or more rules to map a query statement to a structured query language (SQL) statement specifically tailored to a format of the relational database; generating, by an object-relational mapping (ORM) unit, an SQL statement corresponding to the format of the relational database based on the metadata, the SQL statement having a parameter representing the boolean parameter of the query statement in one of a numeric value and a string formats based on the predicted data type; and accessing an entry of the relational database using the SQL statement.