Updating seperate database when post attachment is changed

You can hook into add_attachment and/or edit_attachment actions and carry out an update on your separate database with the appropriate info. In both cases the attachment ID seems to be the only argument but you can easily get_post or get_post_meta if you need anything else.

Cheers!