Bharath Raja wrote:have you idea about triggers
Triggers may appear to be cool, but no, I wouldn't advise to use drivers. There is no execution order specified for triggers and once there are more than a handful of them, any troubleshooting is a nightmare.
Stored procedure would be much better way in this case, if someone wanted to implement the logic in the database.