Active documents : satisfiability of queries and view maintenance