comp.lang.ada
 help / color / mirror / Atom feed
From: Peter Brooks <peter.h.m.brooks@gmail.com>
Subject: Re: Multiple keys for a map
Date: Tue, 17 Sep 2013 22:44:49 -0700 (PDT)
Date: 2013-09-17T22:44:49-07:00	[thread overview]
Message-ID: <97908b8e-3aa7-4e60-9c7b-b2864060d39d@googlegroups.com> (raw)
In-Reply-To: <58c932ec-9830-4ae2-8244-91d621d9d694@googlegroups.com>

On Wednesday, 18 September 2013 07:19:18 UTC+2, Shark8  wrote:
>  
> I'm vaguely reminded of Prolog by this question: this problem was basically the intro for the book I had.
>
Well remembered! It's exactly the sort of question Prolog was designed to answer. Actually, Prolog might be a much better front-end to a triplestore than SPARQL. I'm not sure, I'll look into it. I see that there's a simple Prolog interpreter with an Ada API here: xhttp://goanna.cs.rmit.edu.au/~dale/software/ it might be just the thing.

Anyway, that's for a bit later, I'm still, obviously, working to get the structure right.

Unfortunately the array of hash-keys doesn't work with the with Ada.Containers.Hashed_Maps package.

It looks as if the sensible thing will to create a container for the subject, then simply point the predicate, object and group items to it. It makes some sense as the object space is much smaller than subject space, and the predicate space is very small and the graph space tiny.

It probably makes sense to have graphs and predicates in a simple array, there are so few of them, and only have efficient searching for subjects and objects. It makes the model much simpler. Even if all three have the same treatment, it makes sense for them to occupy separate spaces because that makes the chance of duplicates turning up even smaller.

      reply	other threads:[~2013-09-18  5:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 14:51 Multiple keys for a map Peter Brooks
2013-09-17 16:52 ` Dmitry A. Kazakov
2013-09-17 17:49   ` Peter Brooks
2013-09-18  7:22     ` Dmitry A. Kazakov
2013-09-18  9:34       ` Peter Brooks
2013-09-17 18:57 ` gautier_niouzes
2013-09-17 19:20   ` Peter Brooks
2013-09-18  5:19 ` Shark8
2013-09-18  5:44   ` Peter Brooks [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox