Let's say I have a table of messages which contains a column to reference the message's parent item (e.g. the parent's auto_incremented primary key), which can be from one of a number of different tables. Adding a column for each different foreign table seems crude and would result in having lots and lots of nulls, since each message will only have one parent; however, if I just used a single column, I wouldn't know whether it references foreign table A, B or C. What's the most elegant solution here? Store the foreign table name in a column along with the parent ID?