Quote:
Originally Posted by Acute
is it good to use explicitly foreign keys?
|
absolutely yes
Quote:
Originally Posted by Acute
what if i'm sure that my php will handle that things?
|
you should still use foreign keys anyway
php may not be the only way that you will ever want to enter information -- you might want to do data loads, for example
Quote:
Originally Posted by Acute
do foreign keys affect on db efficiency?
|
sort of
they don't have any effect on SELECTs, but INSERTs and DELETEs are a very tiny bit slower
what would you prefer -- an operation that is a tiny bit slower but guaranteed to result in correct data, or an operation that is a tiny bit faster but might result in incorrect data?