Mentions légales du service

Skip to content

Addition of a downward post-insertion filtering in the lazy join algorithm

Chaque noeud de l'arbre a pour champs:

  • M : internal relation table
  • delta : M sub-schema used by parent node
  • projected_M : M projected on delta
  • children : children nodes
  • on_modified_path : boolean set to true if the node has been modifier during the insertion
let rec aux_downward(parent_new_M, node) =
     let new_projected_M = project node.delta parent_new_M in
     let same_projected_M = (new_projected_M = node.projected_M) (* si on conserve le cardinal de projected_M, on peut optimiser ce test d'egalite *)
     if not node.on_modified_path && same_projected_M
     then node (* no change *)
     else
       let new_M =
         if same_projected_M
         then node.M (* no need to filter *)
         else join node.M new_projected_M in (* filtering node.M *)
       let new_children =
         List.map
           (fun child -> aux_downward(new_M, child))
           node.children in
      { node with  (* on cree ou modifie le noeud courant avec les nouvelles valeurs *)
        projected_M = new_projected_M;
        M = new_M;
        on_modified_path = false; (* reset *)
        children = new_children }

Then, for each child in root.children: call aux_downward(root.M, child)