Setting constraints and rules in the database is better than writing special code to handle the same task since it will prevent another developer from writing a different query that bypasses all of the special code and could leave your database with poor data integrity.

addthis_url = ‘http%3A%2F%2Fcodespatter.com%2F2008%2F05%2F06%2Fhow-to-use-triggers-to-track-changes-in-mysql%2F’;
addthis_title [...]