TicketDB is a class that uses an ArrayList to manage Ticket objects. It provides methods to add tickets, calculate the average price, retrieve tickets by ID, obtain tickets within a price range, and write all tickets to a text file called 'tickets-report.txt' using printf formatting. The class implements methods for core ticket data management and reporting functionality.