As research in building energy demand simulation is reaching maturity, there is now a growing interest in the evaluation of the energy need of larger and/or pre-existing urban areas [1, 2, 3], to evaluate the energy performance associated with alternative development or improvement scenarios. These past years, the urban energy use simulator CitySim was developed at EPFL based on multiple physical models. CitySim can compute an estimation of the on-site energy use for heating, cooling and lighting; however for this it needs a complete physical description of the buildings in the form of an XML input file. To simulate just a few buildings, it is convenient to simply enter this information manually through a graphical user interface; but when buildings are counted in hundreds or thousands, a more efficient method is required: data handling in databases. This paper describes the methodology used to take best advantage of PostgreSQL and QuantumGIS to manage the inputs needed by CitySim and the large amount of results produced. It describes the database structure used for the case study and the working principle of the Java tool that links the database and CitySim. The methodology was successfully applied to simulate a case-study neighbourhood of Zürich City and produced useful energy demand graphs.