How can I use Fuseki as a database, and use JAVA API to update? #1246
-
That's what I want to do:
I wonder if I missed something about Jena? How can I use Jena properly as a database? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
See also discussion on issue: #1243 The SPARQL answer is the SPARQL Graph Store Protocol (GSP): https://www.w3.org/TR/sparql11-http-rdf-update/. With this, the application can fetch the whole graph (GET), work on it locally and then replace the original (PUT - replace original). This is a standard mechanism and all triple stores should offer it. To work with a remote graph in the model style, needs a custom protocol to handle blank nodes correctly. It assumes a manageable size of the graph but in a different way, so does a model view of remote data where the only access primitive is "listStatements". To find data can require several "listStatements", which is several round-trips to the database and some of which may pull back a lot of data (the "client-side join" issue common in various NoSQL systems). So if the graph is small enough, get it locally, update and put back. If it is large, consider using tools aimed at larger scale data working with many triples at the same time i.e. SPARQL. The SPARQL requests can be built programmatically. Some of the work needed to set them up can be reduced templating, then the API term operations are available. Simple example to add a triple:
(caveat blank nodes). |
Beta Was this translation helpful? Give feedback.
-
Hi, This is very helpful to me. With it, I can use Fuseki as a database to store RDF data, and use RDFConnection API to query or update. It's very convenient. Thank you. |
Beta Was this translation helpful? Give feedback.
See also discussion on issue: #1243
The SPARQL answer is the SPARQL Graph Store Protocol (GSP): https://www.w3.org/TR/sparql11-http-rdf-update/. With this, the application can fetch the whole graph (GET), work on it locally and then replace the original (PUT - replace original). This is a standard mechanism and all triple stores should offer it.
To work with a remote graph in the model style, needs a custom protocol to handle blank nodes correctly.
It assumes a manageable size of the graph but in a different way, so does a model view of remote data where the only access primitive is "listStatements". To find data can require several "listStatements", which is several round-trips to the d…