Search code examples
containersrdfsemantic-web

Difference between RDF Containers and Collections?


I have read from a book

The difference between containers and collections lies in the fact that containers are always open (i.e., new members may be added through additional RDF statements) and collections may be closed.

I don't understand this difference clearly. It says that no new members can be added to a collection. What if I change the value of the last rdf:rest property from rdf:nil to _:xyz and add

_:xyz rdf:first <ex:aaa> .
_:xyz rdf:rest rdf:nil .

I am thus able to add a new member _:xyz. Why does it then say that collections are closed?


Solution

  • The key difference is that in a Container, you can simply continue to add new items, by only asserting new RDF triples. In a Collection, you first have to remove a statement before you can add new items.

    This is an important difference in particular for RDF reasoning. It's important because RDF reasoning employs an Open World Assumption (OWA), which, put simply, states that just because a certain fact is not known, that does not mean we can assume that fact to be untrue.

    If you apply this principle to a container, and you ask the question "how many items does the container have", the answer must always be "I don't know", simply because there is no way to determine how many unknown items might be in the container. However, if we have a collection, we have an explicit marker for the last item, so we can with certainty say how many items the collection contains - there can be no unknown additional items.