A method and apparatus for building and maintaining a database in a
digital television receiver from information received in MPEG and PSIP
tables uses the MPEG tables as a master to facilitate creating, updating,
and deleting the database. Each database entry is encapsulated in a
memory chain control structure such that freeing memory does not require
consideration of the specific content of data in the database.