Retrieve preference data from the database