问题
I'm building a system that will auto-drop someone from one or more mailing lists, when they subscribe to another mailing list. I have a table 'lists' containing the list names. Each list will have one or more children in the form of 'exclusions', which are basically other lists. Here is my table:

I'm wondering how best to achieve this. I originally thought of having another table called 'exclusions' linked via a lookup table with a many-to-many relationship, then I could grab all the exclusions for a particular list name.
However, the exclusions are basically the same list names that are contained in the lists table, so it seems like I have redundant data there.
Would there be a better way of acheiving this? I considered adding an extra column to the lists table, containing the ID's of the other lists that I need to exclude.
回答1:
I think adding a new table that will link the ID of your list to the ID of the email address would be the best course of action with this. Then when your system goes to send email to a specific list, the lookup can be done on this table using joins to the referenced tables.
回答2:
I found that the answer lies here, in the form of a 'junction' or 'mapping' table: How can I associate one record with another in the same table?
来源:https://stackoverflow.com/questions/25868250/building-the-tables-for-an-auto-drop-subscription-system