0

Knowing that a .rdf file contains a list of resources that can represent triples (I understand that RDF files can be converted to a list of triples from this question: What's a RDF triple?, and also from having played around with the W3C RDF validator).

Can a collection of .RDF files represent all the data that is available at an RDF-compliant endpoint?

Zach Smith
  • 8,458
  • 13
  • 59
  • 133
  • 1
    It's not really clear what you're asking, to be honest. Are you asking if all data available at an RDF endpoint _can_ be represented in a (collection of) RDF files (then the answer is yes)? Or are you asking if any RDF endpoint is always represented as a collection of files (then the answer is no)? Or something else entirely? Please [edit] your question to clarify the problem. An example might be helpful. – Jeen Broekstra Mar 10 '20 at 08:01
  • Thanks - knowing that RDF files can be the database itself is helpful. Subsequently I've been looking into n3.js, which as far as I can tell allows for serializing triples to a file. I'm more using to working with data via a database management server such as sql server, Mongo, etc. The idea that the files could represent the database itself in a human readable way seems strange and novel to me. Also. I was expecting the dataset I was working with to be much larger such that serializing to file(s) would be impractical. So I was confused. – Zach Smith Mar 10 '20 at 08:09
  • 1
    You misunderstand. I did not suggest that "RDF files can be the database itself". – Jeen Broekstra Mar 10 '20 at 08:31
  • 1
    And you're absolutely right that for large datasets this would be impractical. RDF database systems (aka 'triplestores') exist for this purpose. – Jeen Broekstra Mar 10 '20 at 09:00
  • Ah I see. Thank you – Zach Smith Mar 10 '20 at 10:36

1 Answers1

1

If you are asking about "Open World" vs. "Closed World" like in...

Statement: "Mary" "is a citizen of" "France"

Question: Is Paul a citizen of France?

"Closed world" (for example SQL) answer: No.

"Open world" answer: Unknown.

Source: https://en.wikipedia.org/wiki/Open-world_assumption

...you could follow this link: Open world assumption and SPARQL in triple stores

Community
  • 1
  • 1
jschnasse
  • 8,526
  • 6
  • 32
  • 72
  • I have only come across 'open world' vs 'closed world' briefly before - it wasn't my intention that my question would relate to this at all. Looking at the question you linked though - I see this answer https://stackoverflow.com/a/47344359/3114742 that mentions SPARQL works via closed world assumptions. Which would mean that from the perspective of querying RDF data via SPARQL, I can assume that RDF defined in prefixes (which I think is the default graph) that the prefixes linking to RDF files ARE entire resources? – Zach Smith Mar 03 '20 at 10:16
  • what is "RDF defined in prefixes"? there is no such concept in RDF. Guys, don't mix up "prefix" with "namespace" or "prefix declarations". – UninformedUser Mar 03 '20 at 10:53
  • apologies @UninformedUser. I think I meant "RDF namespaces" - which I know can defined for convenience as prefixe declarations. in what is apparently the 'turtle' syntax. – Zach Smith Mar 03 '20 at 13:01
  • @jschnasse, the prefix declarations in the sparql queries that I have seen, when copy/pasted into a browser result in downloaded .rdf files. Actually. Running queries it looks like object IRIs that come back are NOT in the .rdf files. So for this reason I think I can assume that a .rdf file does to contain all the triples that represent the datastore itself – Zach Smith Mar 03 '20 at 13:14
  • The web is the datastore. There are no guaranties. Imagine a [distributed database](https://stackoverflow.com/a/49066324/1485527) where everyone can add relations to. – jschnasse Mar 03 '20 at 13:36