Graph Data Model and Graph Query Language Based on the Monadic Second-Order Logic
Yunkai Lou,Chaokun Wang,Songyao Wang
DOI: https://doi.org/10.1109/tbdata.2024.3455172
2024-01-01
IEEE Transactions on Big Data
Abstract:With the wide application of graphs in various fields, graph query languages have attracted more and more attention. Existing graph query languages, such as GraphQL and SoQL, mostly have similar expressive power as the first-order logic or its extended versions, and are limited when used to express various queries. In this paper, since the graph data model is the base of the graph query language, we propose a new graph data model with the expressive power of monadic second-order logic (abbr. MSOL), and then present a more expressive SQL- like declarative graph query language named $SOGQL$ to support more common queries efficiently. Specifically, a new graph calculus is firstly proposed based on MSOL for attributed graphs. Then, the new graph data model is proposed. Its graph algebra, which operates on graph sets, has seven fundamental operators such as union, filter, map, and reduce. Next, the graph query language $SOGQL$ is proposed based on the graph data model. Since the graph algebra has the same expressive power as the graph calculus, $SOGQL$ has the expressive power of MSOL, and can express queries with constraints on subgraphs. Moreover, applied with $SOGQL$ , a prototype system named $SOGDB$ is implemented. $SOGDB$ is applied with $SOGQL$ , and the experimental results show its efficiency.