Setup to use external database