Rule processing in active database systems