Extended build-database.sh