I noticed wordpress/rails etc do not use foreign keys constraint or cascade deletes features from database. Instead they handle this in PHP/Ruby/scripting level!
I have read thisthis and thisthis. Most arguments against foreign keys constraint talks about performance, multithreading, locking, scalability, etc.
Assuming arguments against foreign keys are valid, my question are:
- If foreign keys are bad, why WordPress/Rails/etc uses a sql-server which supports foreign keys? Will they benefit going away from MySQL to a NoSQL kind of server?
- On other hand, can applications coded in a way to make use of foreign keys feature without running into issues?
- Is noSQL/redis better if we are using database only for storage and managing "relations" at application/script layer?