Hello all,

I would like to ask for your opinion on something.

I want to use a triplestore together with a DB, I would prefer MySQL. I do not want fancy things from it or that is very fast. The only thing I need is to store triple patterns and also their selectivity. Moreover, often I would like to store triple patterns together with filters. Then I would query for a triple pattern and the answer would be the selectivity number.

The way I imagine the DB table is:

ID subject predicate  object      filter   selectivity
1     ?s   birthPlace New_York    ?s = ...      15

I was thinking of using SDB from Jena. Would it be possible to support this kind of table? Once again, I want to keep the solution as simple as possible. For this specific part, I do not care about fast query execution, even though an index might be a good idea if the entries in the table are more in the future.

Thank you!

asked 24 Feb '13, 17:22

Christos's gravatar image

accept rate: 33%


A triplestore doesn't store patterns, but concrete statements without variable fields (like ?s in your example). The selectivity of a statement (triple) is always exactly 1. What you are describing doesn't make sense to me. You should probably put more effort in trying to clarify what your intentions are, but there is no triple store that follows your description. Triplestores store triples, and you query them by using patterns, not the other way around.

(25 Feb '13, 08:13) Gerrit V Gerrit%20V's gravatar image

Hello all,

based on your comments, I guess that what I want to do is impossible with triple stores, since this is not their purpose.

How about using a simply relational database, MySQL, store there the columns as I described them, and then send from my application SQL queries to this database and get as answer the number of results?

This would make more sence I guess...

(26 Feb '13, 05:23) Christos Christos's gravatar image

Jena SDB uses a schema to store RDF and is not extensible to other graph forms. It is not a general table layout.

As with any RDF system, what you might wish to do is to record your information in RDF (see n-ary predicates or reification to capture the additional information you want to add).

The other choice is a graph database that is not RDF specific e.g. Apache Giraph (large scale) or Neo4j (there are many of these to choose from).

permanent link

answered 25 Feb '13, 03:33

AndyS's gravatar image

AndyS ♦
accept rate: 33%

If you want to keep it simple choose a simple triple store first. Have a look at ARC2, it's PHP package that comes with a MySQL triplestore and is really easy to set up (See 'a complete example' here).

All triplestores will only store the actual triples. That is: subject - predicate - object. And sometimes a forth column called Graph or Context. So, like Andy suggested, I think the easiest way to save your 'filter' and 'selectivity' data is to use reification, which means you create extra triples to describe what data comes with a certain triple.

permanent link

answered 25 Feb '13, 04:28

Flion's gravatar image

accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 24 Feb '13, 17:22

question was seen: 1,127 times

last updated: 26 Feb '13, 05:23