- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Tue, 25 Feb 2014 21:23:43 +0100
- To: Hugh Glaser <hugh@glasers.org>
- Cc: Semantic Web <semantic-web@w3.org>
- Message-ID: <CAKaEYh++1U_RsrtCfHSOypoyv9a6MCmLjwQtmCNDpcS1AY66HQ@mail.gmail.com>
On 25 February 2014 21:17, Hugh Glaser <hugh@glasers.org> wrote: > Hi Melvin, > My three-ha'p'orth. > > So I think we need to ask to what purpose? > What I am trying to do is "webize" the bitcoin block chain. In the block chain you have inputs and outputs and one references the 'index' of the other. As it happens they are ordered but they need not be, it could also work fine as an associative array. > As so often happens - what are the typical queries? > Read queries will just be to get transactions and to check balances. Write queries would be to add a transaction of a 'block' of transactions. > > Do you just want an "index" for each transaction? > Pretty much yes, I think. > Or do you want to be able to get from one transaction to the next? > I dont currently have this use case, that I know of. > If you want to be able to do all the sequence things like first and rest > etc., then you are likely to need something a little complicated, such as > rdf:Seq or as suggested by others. > But if you don't, then personally I see no reason why you shouldn't have > something like your suggestion. > After all, you are just looking to establish a bijection between the > transactions and the ordinal numbers. > I would use URIs instead of literals. > I try to user URIs wherever possible, but in this case im modelling literals in a bijection > And there is the perfect set of instances to use over at > http://km.aifb.kit.edu/projects/numbers/ > If you use these Linked Open Numbers, then you will get > > <transaction1> <hasNumber> <http://km.aifb.kit.edu/projects/numbers/n1>. > > <transaction2> <hasNumber> <http://km.aifb.kit.edu/projects/numbers/n2>. > > <transaction3> <hasNumber> <http://km.aifb.kit.edu/projects/numbers/n3>. > Ah, nice idea! > > Simples! > However, even if you do want to get go through transactions, then because > those nice people over at Karlsruhe have put in an infinite amount of time > connecting all of them together, you can use URI resolution and Follow Your > Nose to get from one to the next via > http://km.aifb.kit.edu/projects/numbers/number#next > > On the other hand, if you want to get from one transaction to the next in > SPARQL, you can: > > SELECT ?nextTransaction > WHERE { <transaction1> <hasNumber> ?n . > ?n <http://km.aifb.kit.edu/projects/numbers/number#next> ?succ . > ?nextTransaction <hasNumber> ?succ . } > > Of course you will have had to load all of the numbers into your store to > be able to do this, but storage is cheap nowadays. > Mind you, if you have some reasonable limit on transaction numbers, then > loading a few thousand is not really a big deal. > I'm hoping to make this a distributed store, so replicated in many places. Therefore space saving would be advantageous. > > I do not recommend using other versions of the numbers, as there are a lot > of counterfeit numbers out there - > http://km.aifb.kit.edu/projects/numbers/ are the only real (sic) ones. > Thanks for the pointers, very helpful! :) > > Best > Hugh > > On 24 Feb 2014, at 23:55, Melvin Carvalho <melvincarvalho@gmail.com> > wrote: > > > I'm looking for a predicate that will indicate the order in a sequence > that a subject belongs to. > > > > <transaction1> <hasNumber> 1. > > > > <transaction2> <hasNumber> 2. > > > > <transaction3> <hasNumber> 3. > > > > I'm not sure I really want to be using rdf : Seq in this case > > > > Anyone know of something like this, or should I just use "label" ? > > -- > Hugh Glaser > 20 Portchester Rise > Eastleigh > SO50 4QS > Mobile: +44 75 9533 4155, Home: +44 23 8061 5652 > > >
Received on Tuesday, 25 February 2014 20:24:12 UTC