Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is a data model that allows you to express this kind of information perfectly, that is RDF/RDFS . <a href="http://en.wikipedia.org/wiki/Resource_Description_Framework" rel="nofollow">RDF</a> is a W3C standard to model data based on triples (subject, predicate, object) and URIs; and <a href="http://www.w3.org/TR/rdf-schema/" rel="nofollow">RDFS</a> , among other things, allows you to describe Class hierarchies and Property hierarchies. And the good thing is that there are many libraries out there that help you to create and query this type of data.</p> <p>For instance if I want to say that a specific document <code>Lion</code> is of class <code>Animal</code> and <code>programmer</code> is of class <code>Geek</code> , I could say:</p> <pre><code>doc:lion rdf:type class:mamal . doc:programmer rdf:type class:Geek . </code></pre> <p>Now I could declare a hierarchy of classes, and say that every mamal is an animal and every animal is a living thing.</p> <pre><code>class:mamal rdfs:subClassOf class:animal . class:animal rdfs:subClassOf class:LivingThing . </code></pre> <p>And, that every geek is a human and that every human is living thing:</p> <pre><code>class:geek rdfs:subClassOf class:human . class:human rdfs:subClassOf class:LivingThing . </code></pre> <p>There is a language , similar to <code>SQL</code>, called <a href="http://www.w3.org/TR/rdf-sparql-query/" rel="nofollow">SPARQL</a> to query this kind of data, so for instance if I issue the query:</p> <pre><code>SELECT * WHERE { ?doc rdf:type class:LivingThing . } </code></pre> <p>Where <code>?doc</code> is a variable that will bind things type of <code>class:LivingThing</code>. I would get as result of this query <code>doc:lion</code> and <code>doc:programmer</code> because the database technology will follow the semantics of RDFS and therefore by computing the closure of classes it'll know that <code>doc:lion</code> and <code>doc:programmer</code> are <code>class:LivingThing</code>.</p> <p>In the same way the query:</p> <pre><code>SELECT * WHERE { doc:lion rdf:type ?class . } </code></pre> <p>Will tell me that <code>doc:lion</code> is <code>rdf:type</code> of <code>class:mamal</code> <code>class:animal</code> and <code>class:LivingThing</code>.</p> <p>In the same way that as I just explained, with RDFS, you can create hierarchies of properties, and say:</p> <pre><code>doc:programmer doc:studies doc:computerscience . doc:lion doc:instint doc:hunting . </code></pre> <p>And we can say that both properties <code>doc:skill</code> and <code>doc:instint</code> are sub-properties of <code>doc:knows</code>:</p> <pre><code>doc:studies rdfs:subPropertyOf doc:knows . doc:instint rdfs:subPropertyOf doc:knows . </code></pre> <p>With the query:</p> <pre><code>SELECT * WHERE { ?s doc:knows ?o . } </code></pre> <p>We will get that a lion knows how to hunt and programmers know computer science.</p> <p>Most RDF/RDFS databases can easily deal with the numbers of elements you mentioned in your question, and there are many choices to start. If you are a Java person you could have a look at <a href="http://jena.sourceforge.net/" rel="nofollow">Jena</a>, there are also frameworks for .Net lije <a href="http://razor.occams.info/code/semweb/" rel="nofollow">this one</a> or Python with <a href="http://code.google.com/p/rdflib/" rel="nofollow">RDFLIB</a></p> <p>But most importantly, have a look at the documentation of your CMS, because maybe there are plugins to export metadata as RDF. Drupal, for instance, is quite advance in this case (see <a href="http://drupal.org/project/rdf" rel="nofollow">http://drupal.org/project/rdf</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload