From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.137.67 with SMTP id v3mr4622837qat.0.1379483090052; Tue, 17 Sep 2013 22:44:50 -0700 (PDT) X-Received: by 10.49.82.137 with SMTP id i9mr2684qey.16.1379483090039; Tue, 17 Sep 2013 22:44:50 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!d5no375593qap.0!news-out.google.com!gv3ni456qab.0!nntp.google.com!d5no375590qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 17 Sep 2013 22:44:49 -0700 (PDT) In-Reply-To: <58c932ec-9830-4ae2-8244-91d621d9d694@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.236.35.136; posting-account=p-xPhAkAAADjHQWEO7sFME2XBdF1P_2H NNTP-Posting-Host: 105.236.35.136 References: <4f66d847-d030-4aa9-8bdf-9bcc5f3a0852@googlegroups.com> <58c932ec-9830-4ae2-8244-91d621d9d694@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <97908b8e-3aa7-4e60-9c7b-b2864060d39d@googlegroups.com> Subject: Re: Multiple keys for a map From: Peter Brooks Injection-Date: Wed, 18 Sep 2013 05:44:50 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2607 Xref: news.eternal-september.org comp.lang.ada:17198 Date: 2013-09-17T22:44:49-07:00 List-Id: On Wednesday, 18 September 2013 07:19:18 UTC+2, Shark8 wrote: > =20 > I'm vaguely reminded of Prolog by this question: this problem was basical= ly the intro for the book I had. > Well remembered! It's exactly the sort of question Prolog was designed to a= nswer. Actually, Prolog might be a much better front-end to a triplestore t= han SPARQL. I'm not sure, I'll look into it. I see that there's a simple Pr= olog 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 st= ructure right. Unfortunately the array of hash-keys doesn't work with the with Ada.Contain= ers.Hashed_Maps package. It looks as if the sensible thing will to create a container for the subjec= t, 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, th= ere 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 t= reatment, it makes sense for them to occupy separate spaces because that ma= kes the chance of duplicates turning up even smaller.