Not that I know of. For undo, the only efficient way you can implement it is by restoring your backup. You can, however, implement a history mechanism on your code record what is happening to your records. The drawback, on the other hand, is an additional space and processing on your database. It might be applicable for small applications, but not for large systems.
[Update]
This might be a helpful resource when you want to learn about SQL Triggers.
http://www.sqlteam.com/article/an-introduction-to-triggers-part-i[
^]