0

I'm learning the semantic-web technologies and the power of linked data. Use of RDF, RDFS, OWL inference could come really handy. Sparql query to read linked data from the triple store is cool and seamless. As I think more about the practical use, wondering if it's good for full blown CRUD transactional usage. While Sparql supports insert and update operations, is it practically adopted? any best practice guidance?

2 Answers 2

1

Virtuoso supports full ACID operations for (C)reate, (R)ead, (U)pdate, (D)elete operations.

It pulls this off by being a multi-model DBMS that fuses the relational operational features of both SQL and SPARQL.

As already indicated, you can issue a SQL query to Virtuoso that includes SPARQL (via the FROM CLAUSE). Even better, you can add "FOR UPDATE" to said SQL to trigger full ACID behavior.

Links

1

I'm not sure what you want to know exactly but I try to answer as best as I understand your question (can you maybe improve it a bit and write what your exact problem is that you want to solve?):

SPARQL 1.1 Update (formerly known as SPARUL or SPARQL Update in SPARQL 1.0) allows creating, reading updating and deleting resources.

In contrast to the relational database world, where databases commonly have read and write access, but are only accessible to a select few using some method of authentication (data silos), it is very common in the Semantic Web world to publish data over public SPARQL endpoints. Contrary to some other forms of data sharing like Wikipedia, those are provided only with read access in all cases that I know of.

However it is absolutely still a common use case to allow SPARQL 1.1 Update queries over a protected connection separate from the public SPARQL endpoint interface.

For example, one could have a CRUD application, like OntoWiki, which is installed on the same server as a Virtuoso SPARQL endpoint, and which connects to the endpoint using ISQL on the network, as Virtuoso ISQL supports SPARQL queries, including updates, using the SPARQL keyword in the first line of your ISQL query.

If you only rarely want to perform some specific SPARQL 1.1 update queries and you don't need a separate CRUD editor for that, in the case of Virtuoso SPARQL you can also run those queries in the conductor web interface in the SQL tab.

However most SPARQL endpoints (often excepting Virtuoso, which may or not behave as described, depending on various settings and the specific methods and patterns of interaction) do not preserve data integrity beyond the triple level, because as far as they are concerned they only store graphs, which are sets of triples. Integrity conditions described on a higher level (for example, using OWL, RDFS, or SHACL) are not checked and thus not preserved by such a SPARQL endpoint. This includes:

  • domain and range restrictions (every Mother must be Human and Female)
  • cardinality (every child must have exactly one Father and one Mother)
  • non-binary relationships such as OWL axioms that are expressed using multiple helper triples connected to a single relationship resource.

For some use cases it may make sense to use a traditional relational database with a CRUD interface for specific user input and later transform it, e.g. using R2RML to RDF. Virtuoso may serve both of these functions, among others, due to its hybrid nature.

Not the answer you're looking for? Browse other questions tagged or ask your own question.