Connects to postgresql database; correctly orders tasks and clients; checks for confirmation upon task completeion