Using the properties of datalog to prove termination and confluence in active databasesRules in Database Systems