set's up the infrastrucure for database querries