what are the advantages of defining a foreign key

Foreign keys with constraints(in some DB engines) give you data integrity on the low level(level of database).
It means you can’t physically create a record that doesn’t fulfill relation.
It’s just a way to be more safe.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)