hook the note add/delete into the db