I’m using the “R2RML Upload” and and I check the check box options:
Generate RDB2RDF triggers
Enable Data Syncs with Physical Quad Store
I get a transient graph and a physical graph. Unfortunately not trigger is created.
Before using this functionality, I did several tests with “R2RML Upload” or with the “Linked Data Views Wizard”: could it be that something got corrupted?
When you say Before using this functionality, I did several tests with “R2RML Upload” or with the “Linked Data Views Wizard”, I presume this was against local tables in Virtuoso, as triggers will not be created on externally linked tables?
That is correct … so you effectively have the equivalent of the Materialized Views in PostgreSQL which as with the REFRESH MATERIALIZED VIEW ... command in PostgreSQL you can refresh with the Virtuoso RDF_VIEW_SYNC_TO_PHYSICAL function …
Does the RDF_VIEW_SYNC_TO_PHYSICAL function maintain in sync the transient and the physical graphs, or does it just generate the physical triples once? Imagine to have an external table, a transient graph (generated via RDF Views Wizard or via R2RML Upload), and a physical graph generated via the mentioned function. If something changes in the external table, the transient view reflects this change: does the physical graph get re-synchronized?
One more question: what does it happen at SPARQL level. I mean if someone issue a “describe” request on a resource without specifying any graph, from which graph is the description returned, the transient or the physical?
The RDF_VIEW_SYNC_TO_PHYSICAL functions will sync physical graph once with the transient graph when it is run, and as no triggers can be created on the remote, it would not be aware of any changes to the remote SQL data. Thus RDF_VIEW_SYNC_TO_PHYSICAL would have to be run again if you want it to resync with the remote SQL data via the transient graph (RDF View).
If you execute a “describe” query without a graph name then the query would be executed against ALL graphs in the Quad Store or the DefaultGraph if one is set via a pragma or the Virtuoso INI file.