Used a dictionary as a switch statement to clean up db source code