[mythtvnz] TV1+1 freeview.xml header update?
Stephen Worthington
stephen_agent at jsw.gen.nz
Wed Jul 4 11:12:44 BST 2012
On Wed, 04 Jul 2012 20:44:08 +1200, you wrote:
>On 04/07/12 20:21, tortise wrote:
>>
>> A versioned entity relationship diagram would be very helpful and would
>> IMO be better and more efficient for dev's to spend their time on than
>> locking down SQL access, which is contrary to the philosophy most of us
>> subscribe to here.
>>
>
>That's a good idea. I had the same thought myself a while ago. The
>relationships must surely be documented somewhere already. Maybe buried
>in the source?
My reading of the database is that it really lacks design. It is not
in normal form, which is what you expect from any real database
designer. It seems to have just been modified ad hoc, and while the
end result does work OK at the moment, it must be getting to the point
where making changes to it is becoming difficult. For example, the
problem with freqid in the channel table being used for tuning
analogue channels only, and the tuning data for the digital channels
coming from dtv_multiplex. My understanding is that little problems
like that build up in databases, and eventually cause really major
problems with later changes. It is best to do things the right way
every time you change a database schema. If they want to now add
tuning data for connecting to Internet TV sites, will they add a third
mechanism, or will they properly redesign the tuning bits of the
database?
As a start, at the very least, all fields in all tables should be
documented in the web pages for the database. The tables are shown
here:
http://www.mythtv.org/wiki/Category:DB_Table
but the information is pretty much just what you get from a "describe
<table-name>;" SQL command. Here:
http://code.mythtv.org/doxygen/group__db__schema.html
is more useful information about some fields of some tables, but it is
very incomplete. What you need is a proper description of what each
field is used for and how to use it.
BTW My comments are from using the 0.21-0.24 databases - I have not
moved to 0.25 yet, so I have not seen what they may have done in 0.25.
And it is always possible there is documentation of all the tables and
fields somewhere in the source code - I have not delved in there to
find out.
More information about the mythtvnz
mailing list