change sql queries to match db name