First, the g-extend expression affects to the source. In this case, I will consider many cases:
- Use values only (Don’t use variables in the g-extend expression).
- Use many variables. In this case, the g-extend expression will contains many variables in many levels, so in this case, the result g’-extend will contains WHERE-part corresponding to the variables in the g-extend expression.
The technique using in the algorithm is tree-matching. Base on the tree-pattern of the f-select expression which contains template-tree and graph-pattern-tree, with the g-extend expression which contains template-tree-1, template-tree-2 and graph-pattern-tree also.
The tree-matching is used to find out the matched pattern, and the corresponding variables which match with the pattern.
Fig 1. The result-trees after applying the tree-matching function.
Fig 2. The variables trees are extracted from the result-trees in Fig 1.
Fig 3. Replace the variables in the f-template-tree with the extracted-trees
Không có nhận xét nào:
Đăng nhận xét