W3C home > Mailing lists > Public > semantic-web@w3.org > July 2014

Re: Transforming RDF into (non-binary!) trees

From: Simon Spero <sesuncedu@gmail.com>
Date: Sun, 6 Jul 2014 16:36:20 -0400
Message-ID: <CADE8KM5+6GjK1LfGkBw4Hb5qEo2vbANB55tqLkNmzwEZUiQ7fw@mail.gmail.com>
To: Victor Porton <porton@narod.ru>
Cc: semantic-web@w3.org, Tim Berners-Lee <timbl@w3.org>, Paul Tyson <phtyson@sbcglobal.net>
On Jul 6, 2014 4:08 PM, "Victor Porton" <porton@narod.ru> wrote:

> I am planning to use librdf (for which I am going to create Ada bindings)
and it provides me data in plain triples (or quadruples).
> I need to construct a tree from triples.
> Ada probably does not provide a ready tree structure. I am just going to
link together some records (as in a linked list but with a more complex

Ada does indeed provide a multiway tree structure - see [1] - however it is
probably not the right data structure for rdf unless you have a specific
application and a specific schema that is representing entities whose
relationships to each other are tree like.

If that is the case,  then you need to construct the entities by gathering
triples,  and insert them in a tree in the proper order. If you are only
concerned about this specific application then you can optimize based on
the order of triples presented by the data source.

For general rdf graphs,  you need to use a more graph like structure.  See
e.g. [2].

You could  index rdf triples in 3 trees (one each for s, p, o); you could
also use maps.

[1] http://www.ada-auth.org/standards/12rm/html/RM-A-18-10.html
Received on Sunday, 6 July 2014 20:36:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:17 UTC