7. A computer program product comprising a tangible computer-readable storage device having encoded thereon computer-executable instructions for analyzing a regular tree pattern, the computer-executable instructions, when performed in a computing environment, perform a method comprising: receiving data comprising a regular tree pattern comprising each of at least one of a-sequence and at least one set; determining a first machine corresponding to the at least one sequence; determining a second machine corresponding to the at least one set; creating a union of the first and second machines; determining a set of labeled acceptance states for the union of the machines; determining from the labeled acceptance states a sub-type relationship for the first and second machine; determining a root level machine comprising at least one transition to a labeled nest; creating a module corresponding to the labeled nest; placing a continuation state corresponding to the return of the labeled nest onto a stack; performing actions corresponding to the labeled nest; and when reaching an acceptance state for the labeled nest, popping the continuation state from the stack and resuming processing for the root level machine.
7. A computer program product comprising a tangible computer-readable storage device having encoded thereon computer-executable instructions for analyzing a regular tree pattern, the computer-executable instructions, when performed in a computing environment, perform a method comprising: receiving data comprising a regular tree pattern comprising each of at least one of a-sequence and at least one set; determining a first machine corresponding to the at least one sequence; determining a second machine corresponding to the at least one set; creating a union of the first and second machines; determining a set of labeled acceptance states for the union of the machines; determining from the labeled acceptance states a sub-type relationship for the first and second machine; determining a root level machine comprising at least one transition to a labeled nest; creating a module corresponding to the labeled nest; placing a continuation state corresponding to the return of the labeled nest onto a stack; performing actions corresponding to the labeled nest; and when reaching an acceptance state for the labeled nest, popping the continuation state from the stack and resuming processing for the root level machine. 12. The computer program product of claim 7 further determining whether two database schema are equivalent.