On Thu, Apr 14, 2011 at 14:14, Matija Grabnar <[email protected]> wrote: >> Actually, no, it's not. In the strictest possible mode, employing >> every single way to ensure your data is consistent and that foreign >> keys are being honored, there's a simple thing anyone can do to screw >> you with MySQL. >> >> SET FOREIGN KEYS OFF; > > Oh, you mean that, if you turn checking off, it doesn't do checking? > Gasp! Why, that's like saying that a gun fires bullets when you pull > the trigger. So just don't set foreign keys off. Foreign keys is on by > default.
I didn't turn foreign keys off. My idiot coworker did. >> BAM! You're done. Finished. You cannot trust a single thing in your >> database the way you can in EVERY SINGLE OTHER relational database. > > Well, why did you turn off checking? It's a TOOL, a powerful tool. Like all > powerful tools, if you disabled the safeties, you have to know what you're > doing. Just like a power saw, you can do very good work, or you can cut off > your > thumb. How about making an option where I can disable the ability for certain users to turn off foreign keys? Or turn off strict mode? The whole point of a relational datastore is to be able to make assertions about the relationships between the data points. If foreign key checking can be turned off, then not validated when turned on, I cannot make those assessions. Thus, the quality of the data is null. Rob _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
