Implemented trigger functionality on required tables.