Some thoughts on database enhancements
Some work was done on an alternative to the MySQL/MariaDB database a few years
ago, using PostgreSQL. We decided against this database engine but the design
might have some features that are helpful.
These are ideas from the Pg database(s) in no particular order:
- Merging of the Today with a Techie shows with the HPR shows.
- In my design I had a simple integer primary key and an episode key like
twat001andhpr001to differentiate the two origins.
 
- Licenses in the episodestable as foreign keys into alicensestable
- IA status information in the episodestable such as anarchivedcolumn
to show the IA status along with IA dates, and URLs.
- Show status like reserved,processingandposted(an enumerated type)
as a column in theepisodestable
- An episode->host relationship to allow multiple hosts per show (as well as
the current multiple shows per host). Implemented through an
episodes_hosts_xrefcross-reference table.
- An episode->series relationship as at present. Implemented through an
episodes_series_xrefcross-reference table.
- An episode->tag relationship. Implemented through an episodes_tags_xrefcross-reference table.
- Comments exactly as now. A trigger maintains a last_changedcolumn (as
now).
- An assetstable with a FK relationship with theepisodestable.
Further suggestions:
- A means of detecting changes in the notes (or other attributes) for each
show. Perhaps a note hash column? Perhaps a last_changedcolumn linked to
a trigger? The point is, if we're maintaining parity between the HPR copies
and the IA copies of these shows we need a way of detecting changes.