Abstract. Database systems are an essential component in multi-tiered web applications. These applications increasingly interact with others using web services. In this paper, we describe and compare two architectures for integrating web services into web applications, and perform performance benchmarks using the Google web service. For one of the architectures we contribute a SOAP interface to the PostgreSQL Relational Database Management System, implemented as a user-defined function that allows developers to make service calls from within the database. We show that SQL can be used to easily query data provided by web services, and therefore as a way of accessing and using web services in a database-driven web application.