-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c708ec
commit 0f30662
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
# Sparql-to-cypher | ||
# Sparql-to-cypher | ||
|
||
## Testbench | ||
It must be demonstrated that the query conversion process retains the query semantics from the original language. Following the Test Driven Development | ||
practices, we developed a testbench to test the query conversion and validity. It has support for changing the underlying graph conversion schemes and hence independent of the RDF to PG conversion. This makes it suitable for all the phases in the three-phase development process. The testbench is aimed to provide fast feedback and exhaustively test the transpiler over various datasets and language constructs. It is also made for easy extension of test cases over different databases and queries. Each testcase in the testbench consists of a RDF dataset and SPARQL query. The RDF Graph is converted to PG and SPARQL to Cypher, and the results of executing the queries on their respective datasets is then evaluated for equivalence. The RDF to PG conversion is used to ensure the correctness of transpiler by evaluating equivalence of results of the SPARQL and converted Cypher queries. | ||
|
||
## RDF to PG | ||
The custom RDF to PG converter for phase one iterates over each triple in an RDF dataset and creates a node for the subject and the object in the triple. The predicate in the triple becomes the edge label in the PG. A *MERGE* query corresponding to the subject and object of each triple is created using the visitor design pattern. The visitor pattern is used to exhaustively cover all the RDF node types - blank node, IRIs and literals. *MERGE* query in Cypher matches the node pattern in the PG, and upon non-existence, creates it. |