To connect the database and read data from it