Need to extract records from database