On Mar 2, 2008, at 9:36 AM, Andrew (Chuan) Khoo wrote:

So, to list down my questions:
1) How do I import .nt data into mySQL?
2) If there is code provided to parse the data into the mysql store, how do I compile and run it?

rdfproc should be able to do this for you. For example, using the geo coordinates data:

rdfproc -n -s mysql -t "host='localhost',database='test',user='test',password='test'" dbpedia parse geo_en.nt ntriples

This will create a model named "dbpedia" in the "test" database. For future data loading, you'll want to drop the "-n" argument so that you're not creating a new store (and deleting what you've already loaded) on each command.

2) How do I call SPARQL queries (using rasqal?) from php?

On the command line, you can again use rdfproc:

rdfproc -s mysql -t "host='localhost',database='test',user='test',password='test'" dbpedia query sparql - "SELECT * WHERE { ?thing a <http://dbpedia.org/class/yago/landmark > }"

This is also possible through the PHP bindings, but someone else will have to comment on the exact APIs to use.

hope that helps,
.greg

--
"Turns out the Z-machine (yes, the engine that does Zork) has
continuations. Who'd've thunk it? Not only are we 30 years behind Lisp,
 we're 25 years behind text adventure engines..."    - Dan Sugalski

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
redland-dev mailing list
[email protected]
http://lists.librdf.org/mailman/listinfo/redland-dev

Reply via email to