**3.6 Pattern Prime Product (PPT) reasoning for XML queries**

The information that is available on the web is unstructured, extensible mark-up language XML is used to provide the structure to the web information/data. As described above the querying mechanism for current web is keyword based search. Keyword based search is considered to be the non-semantic (Mandhani B. and Suciu D., 2005), (Sanaullah, M., 2008).

A novel method of checking containment is proposed by Gang Wu and Juanzi Li (Gang Wu and Juanzi Li, 2010). Each node in the query is assigned a unique prime number and then the product of these prime numbers is calculated by a specific method. This product is called Pattern's Prime producT (PPT). The query is stored in the cache along with this PPT.

On each next issued query the same procedure is followed to assign unique prime numbers to each node and if any node of the query matches with any existing stored view's node then the same prime number is assigned to new node as it was allotted to previously stored node. The PPT of the new query is calculated and then divided by the PPT of all stored views. If any of stored views completely divides the PPT of the query then that view is selected and rest are rejected. The selected view further processed to make sure whether the occurrences of the nodes in the query and view is similar, i.e Qk = Vk where k is the position of kth axis node. The PPT of each infix is also checked.
