[mythtv] Database normalization things
lists at forevermore.net
Wed Jul 9 14:04:14 EDT 2003
> Not a good idea, IMHO. Primary keys as int on (almost) all tables might
> make sense, but autoincrements have severe problems for important tables
> like channel. If you blow away your channel table (e.g. to regenerate
> it), you must have a way to reassign the exact same IDs to the same
> channels as in the old content, otherwise all the foreign keys in the
> other tables and the filenames of the recordings will all be wrong. Same
> probably applies to other tables as well. Primary keys already assure
wouldn't work so well with the program table, either, as it gets wiped
regularly (well, old data does, anyway).
I personally don't have a problem with multi-field primary keys, though
as Ben said, they do help to simplify things at times.
I'd be happy to look into redoing the database stuff (I do it all day
long at work, anyway). I've already offered to do it for mythmusic (and
still want to), but my C/C++ skills are severely lacking so I'd still
need someone to help with that side of things.
More information about the mythtv-dev