11. A non-transitory computer readable medium providing instructions for optimizing pattern query searches on a graph database, the instructions comprising: reading a first pattern query for a pattern search; identifying a complex configuration in the first pattern query, the complex configuration including at least one branch or cycle; and generating two or more subpattern queries by decomposing each branch and cycle of the complex configuration into equivalent straight line nodes joined by edges to be converted to search expressions, wherein the generating further includes: forming subgraphs by removing nodes that are adjacent to more than two other nodes in the first pattern query; separating the subgraphs into connected components; searching for and locating nodes in any of the connected components that are connected to less than two other nodes in a same connected component; adding nodes in the first pattern query that are adjacent to the located nodes into the connected components along with connecting edges; and when a cycle is found, splitting the cycle into two or more separate paths.
11. A non-transitory computer readable medium providing instructions for optimizing pattern query searches on a graph database, the instructions comprising: reading a first pattern query for a pattern search; identifying a complex configuration in the first pattern query, the complex configuration including at least one branch or cycle; and generating two or more subpattern queries by decomposing each branch and cycle of the complex configuration into equivalent straight line nodes joined by edges to be converted to search expressions, wherein the generating further includes: forming subgraphs by removing nodes that are adjacent to more than two other nodes in the first pattern query; separating the subgraphs into connected components; searching for and locating nodes in any of the connected components that are connected to less than two other nodes in a same connected component; adding nodes in the first pattern query that are adjacent to the located nodes into the connected components along with connecting edges; and when a cycle is found, splitting the cycle into two or more separate paths. 12. The computer readable medium of claim 11 , wherein the graph database is implemented in a relational database management system (RDBMS).