add connection to database + query database