What's the use of assigning foreign keys on MySQL Aside from indexing the value of the foreign key, what is/are the advantage of assigning foreign keys to databases? I've seen a lot of databases that does not assign foreign keys, but is relational by their schema. One example is the database of the wiki (mediawiki). I've studied their schema and although their tables are interconnected using the primary key of one table, they aren't assigning any foreign keys.
A foreign key is a type of constraint.  The purpose of constraints is to make sure that data in tables follows certain rules.  

You use foreign key constraints to ensure that child data has parent data.  You can use it to either prevent orphaning child records or to facilitate cascade deletes or updates.