RDF-DB version 3 is a major redesign of the SWI-Prolog RDF
infrastructure. Nevertheles, version 3 is almost perfectly upward
compatible with version 2. Below are some issues to take into
consideration when upgrading.

Version 2 did not allow for modifications while read operations
were in progress, for example due to an open choice point. As a
consequence, operations that both queried and modified the database had
to be wrapped in a transaction or the modifications had to be buffered
as Prolog data structures. In both cases, the RDF store was not modified
during the query phase. In version 3, modifications are allowed
while read operations are in progress and follow the Prolog logical
update view semantics. This is different from using a transaction in
version 2, where the view for all read operations was frozen at the
start of the transaction. In version 3, every read operation sees
the store frozen at the moment that the operation was started.

We illustrate the difference by writing a forwards entailment rule
that adds a sibling relation. In version 2, we
could perform this operation using one of the following:

In version 3, we can write this in the natural Prolog
style below. In itself, this may not seem a big advantage because
wrapping such operations in a transaction is often a good style anyway.
The story changes with more complicated constrol structures that combine
iterations with steps that depend on triples asserted in previous steps.
Such scenarios can be programmed naturally in the current version.

Generations inside a transaction are represented as
BaseGeneration+TransactionGeneration, where
BaseGeneration is the global generation where the transaction
started and TransactionGeneration expresses the generation
within the transaction. Counting generation has changed as well. In
particular, comitting a transaction steps the generation only by one.

now only accepts a source location and deletes the associated graph
using rdf_unload_graph/1.

Acknowledgements

This research was supported by the following projects: MIA and
MultimediaN project (www.multimedian.nl) funded through the BSIK
programme of the Dutch Government, the FP-6 project HOPS of the European
Commission, the COMBINE project supported by the ONR Global NICOP grant
N62909-11-1-7060 and the Dutch national program COMMIT.