- From: Hugh Glaser <hugh@glasers.org>
- Date: Tue, 25 Feb 2014 20:17:31 +0000
- To: Melvin Carvalho <melvincarvalho@gmail.com>
- Cc: Semantic Web <semantic-web@w3.org>
Hi Melvin, My three-ha’p'orth. So I think we need to ask to what purpose? As so often happens - what are the typical queries? Do you just want an “index” for each transaction? Or do you want to be able to get from one transaction to the next? 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. 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>. 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 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. 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:17:56 UTC