many-to-many relationship with multiple foreign keys
===

I'm creating a timeline that tracks not only user activity on the site, but allows them to add timeline events from before the date they registered with the site. 

I have a history table:

    [historyId]
    historyActionTypeId
    historyDate

The implied historyActionType table stores the verb, e.g. "joined, friended, added:"

    [historyActionTypeId]
    historyActionType (varchar)

What I now need are xref table(s) that will associate the history Id with several different primary keys. The history item in question might link to a userId, or a mediaId (a photo, a video), or a generic text item, such that the following result is possible:


Doug (userId) added foo (videoId)

Janet (userId) friended Doug (userId)

Carl (userId) likes Inception (a video that doesn't exist in our system, but may in the future)

Inception (genericId) has been suggested by Carl (userId) and Janet (userId)

creating three separate xref tables (userHistory, videoHistory, genericHistory) feels wrong, but less wrong than creating a column in a single xref that could contain primary keys from multiple sources.





    