steps to connect with database