how to connect the database