Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
A key aspect of semantic data is not just that it describes relationships (that let you<br />
answer the question, "When was John born?"), but that these relationships can be<br />
interlinked. You can add more triples describing John, and also triples describing Mary,<br />
and some of these facts will intersect. This results in a connected web of information<br />
that can be represented as a graph:<br />
works-for<br />
born-in<br />
born-in<br />
mother-of<br />
father-of<br />
mother-of<br />
married-to<br />
lives-in<br />
lives-in<br />
daughter-of<br />
lives-in<br />
born-in<br />
born-in<br />
works-for<br />
Figure 17: The relationships between many semantic triples can form a web of information.<br />
MarkLogic applications can query large collections of triples (or semantic graphs) to<br />
tell us interesting things. By traversing the triples in a graph, an application might tell us<br />
that John not only was born in the same year as Mary, but also lived on the same block<br />
and went to the same school. With the help of semantic data, we can infer that John<br />
might have known Mary.<br />
STORING TRIPLES<br />
Resource Description Framework (RDF) is the W3C standard that describes how<br />
to represent facts using subject-predicate-object syntax, which is why triples in<br />
MarkLogic are called RDF triples. In RDF, subjects and predicates are represented by<br />
internationalized resource identifiers (IRIs). 14 Objects can be IRIs but also can be typed<br />
literal values such as strings, numbers, and dates.<br />
When MarkLogic ingests a raw RDF triple, it turns the triple into an XML<br />
representation and then loads it as an XML document. So under the hood, MarkLogic<br />
represents semantic data the same way it represents regular XML documents.<br />
Consequently, triples can be managed with all of the features and conveniences<br />
associated with other MarkLogic content. They can be protected with role-based<br />
security, organized in collections and directories, and updated within ACID-compliant<br />
transactions. Triples can also be added to traditional XML or JSON content when<br />
14 IRIs are similar to URIs but have broader support for international characters. For details, see Wikipedia.<br />
95