Python RDF example of a MySQL triple store thanks to redland/librdf

In a way similar to my previous post about persisting graphs in PostGreSQL in PHP, here’s similar examples for Python and MySQL.

Note that you may need to adjust the MySQL table creation templates if you’re running librdf version 1.0.16 (see this bug for details).

The first example will load data from a file, and store the parsed model to the RDBMS, while the second example, will reload the model and issue queries on it.watch A Cure for Wellness 2017 movie now

These examples don’t do much, but hopefully, they’ll help you get started if you’re interested in using redland/librdf.

One potential benefit can be interoperability with other languages like PHP, for instance if you’re running harvesters in Python that will save facts in a triple store, which is then accessed by a PHP application that will publish a Web interface.

Leave a Reply

Your email address will not be published.