sorry I don't know
I am new to the SPARQL database language so I need basic help. how to use the sparql queries in c++ meaning how to extract the data from turtle file using sparql queries in c++. I have installed RDF libraries and filled the turtle file only thing is how to extract turtle file data.
I don't know if this thead is alive, but maybe this will help you.
SPARQL (http://en.wikipedia.org/wiki/SPARQL) is not a database query language. There are bridges between semantic web and relational databases and SPARQL queries (as i know not all, but a very huge set) can be translated to SQL.
So the simpliest SPARQL query is probably this:
SELECT * WHERE {?s ?p ?o}
This query means, that you want to retrive all tripple patterns from some RDF Graph.
Thank so much for your help. so please see what I want is suppose I have turtle file name called example.ttl which contain some data which in turtle format.
now If I want access the turtle file data means I have to use SPARQL query correct right ?
Here is the my big doubt ie which rdf library function I need to use so that I would process and access the sparql query results in my either C/C++ program ( or in simplest way How do i get the sparql query results in my C/C++ program is my worry ) is my big question. Please if have any kind of sample program pls tell me.
1. If you need just to read it, to find if something is equal to something, than you don't need SPARQL. libraptor will be just enough for you (http://librdf.org/raptor/). Using SPARQL in this situation is just unnecessary.
Personally i would recommend you redland libs. Although they are pure c libraries and u'll have to write more lines to do something that in C++ libs, they are very stable and efficient. In the sources of librdf u'll find the examples on how to load turtle/rdf (librdf_parser_parse_into_model) and how to perform queries over rdf model (librdf_model_query_execute).
Are u tied to C/C++? There are a lot of Java solutions.