1. A computer program product, tangibly embodied in an information carrier, the computer program product being operable to cause a data processing apparatus to perform operations comprising: displaying in a web browser a visual model of a database, the visual model including one or more graphical objects representing one or more tables in the database and relations between the tables; receiving in the web browser user input creating a visual model of a query into the database; and generating code for the query based on the visual model of the query.