mysql - Why don't CMS databases use Foreign Keys? -
why cms databases (e.g. wp , prestashop) not use foreign keys on tables? thought tables should have foreign keys prevent orphan rows.
excerpted post (apparently wp staff) at
wordpress.org wordpress › support » plugins , hacks » hacks
the problem mysql few installations default innodb. use myisam tables because more "beginner friendly".
because of wordpress, , pretty every other php-based cms i've seen out there, has think using lowest common denominator, myisam tables no references required can universal possible.
i add wp system has been set use php code enforce integrity can. that's why it's best use built-in wordpress functions rather trying roll own.
only mysql innodb storage engine enforces foreign key declaration. treated comments myisam storage engine, don't know why weren't declared anyway.
posts "custom prestashop software solutions , shared , dedicated virtual hosting services" member at
prestashop.com forum > technical forum > adapting prestashop > development
because supported when using innodb, , not uses that.
and btw, backwards compatibility , thorough testing not prestashop famous for.
Comments
Post a Comment