[Hpr] How to link multiple hosts in a mysql db

Dave Morriss dave.morriss at gmail.com
Wed May 15 03:58:07 PDT 2013


On 15/05/13 11:39, Ken Fallon wrote:
> OK then, how do I deal with someone that contributes but is not a
> host ! For Example, Pokeys Son.

Now you're getting fancy...

It depends on your definition of "host" of course.

I'd rename my 'host' table to 'person' and in the 'episode_person' (aka
link) table add a 'relationship' column. Then Pokey's son could be in
the 'person' table and linked to an episode but be marked not as 'host'
but as ??? ('family', 'affiliate', whatever).

You can also have entries in the 'people' table without them even being
associated with an episode since there doesn't have to be a
corresponding entry in the link table.

I once designed a database for the university I worked at that tried to
represent all of the weird and wonderful relationships that existed
there - student, faculty staff, non-faculty staff, visiting lecturers,
contractors, estate staff, emeritus professors, ex students hired
temporarily on some left-over bit of research grant, etc, etc. It was a
nightmare of complexity!

Dave




More information about the Hpr mailing list