This video shows how to use database triggers with the SQLite database. See more at http://www.squidoo.com/sqlitedatabasedesign for more examples.
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.