GELLO can query a database. This example will show some some code that autocompletes a postcode based on the locality. This page will then show it in use in an archteype.