I have 2 tables. Cla开发者_StackOverflow社区sses and students. I want to create a table which holds two columns class_ID and student_ID. My question ,as a mySQL noob, is do all 3 tables need to be set as innoDB so tha I can benefit from cascades if say a student or a class is deleted? Many thanks.
Yes, it would indeed seem that all tables must be of type innoDB.
You're correct that you'll need to use InnoDB to get support for foreign keys. However, you don't need foreign keys to do cascading deletes as MySQL supports multi-table delete statements. Admittedly, foreign keys simplify things nicely and are probably the way to go.
精彩评论