So the problem I am having is when a member deletes a Story. I want the characters to also be deleted from the Characters table, and the pertaining comments to be deleted from the Comments table etc.
So far this is only working on the Animals table. I think I know why it is not working on the Comments table - because I do not have story_id as an index, right?
As for the Characters table, the column called falsehood (index) is no longer a column of the table (because I removed it, as it was something I was testing), however it remained under the structure, as an index. I left it there because I did not want it to mess anything up. Is that what is causing my problem on this table? Is it safe to delete it?
The next big question is... once I get this working properly, will I have to go in and manually delete from Characters, Comments, the rows that no longer have a pertaining story_id?
story_id is a FOREIGN KEY in the "Characters" and "Animals" tables.
However there is no direct relationship between the "Stories and the Comments tables. You therefore need to add a FOREIGN KEY story_id in the Comments table as well. It makes sense to have a given comment related to a story.