Graph query languages feature mainly two kinds of queries when applied to a graph database: those inspired by relational databases which return tables such as SELECT queries and those which return graphs such as CONSTRUCT queries in SPARQL. The latter are object of study in the present paper. For this purpose, a core graph query language GrAL is defined with focus on CONSTRUCT queries. Queries in GrAL form the final step of a recursive process involving so-called GrAL patterns. By evaluating a query over a graph one gets a graph, while by evaluating a pattern over a graph one gets a set of matches which involves both a graph and a table. CONSTRUCT queries are based on CONSTRUCT patterns, and sub-CONSTRUCT patterns come for free from the recursive definition of patterns. The semantics of GrAL is based on RDF graphs with a slight modification which consists in accepting isolated nodes. Such an extension of RDF graphs eases the definition of the evaluation semantics, which is mainly captured by a unique operation called Merge. Besides, we define aggregations as part of GrAL expressions, which leads to an original local processing of aggregations.
翻译:图表查询语言主要有两种类型的查询:由SELECT查询等相关数据库和SPARQL中CONSTUCT查询等返回图表的数据库激发的查询。本文对后者进行了研究。为此,以COSTUCT查询为焦点,对核心图形查询语言 GrAL 进行了定义,重点是CONSTUCT查询。 GrAL 的查询是涉及所谓 GrAL 模式的循环过程的最后一步。通过对图一的查询进行评估,一个图一的查询获得一个图,通过对图一的图一的图一的图一的图一图一的图一图一图一得到一套匹配,其中既包括图表,也包括一张表格。CONSTUCT的查询以CONSTUCT模式为基础,而子COUCT 模式则不受模式的循环定义。 GrULAL 的语义以RDF 图表为基础,其中含有接受孤立无记号的细微修改。RDF 图表的扩展使评估语义的定义更为方便,因为评估语义的定义主要是由名为Merge的独特操作所捕捉取的图。此外,我们将组合定义为GARAL 的原始阵列。