Foreign key is not working properly ? Why?
Foreign key is not working in Mariadb and new version of MySQL because the foreign key constraint is dropped or new databases stopped support to foreign key due to major problems like data integrity. It has been stopped since before 2020. Currently innodb is the only one database that supports the foreign key constraint. Also foreign keys cannot be used with views in innodb.