delete rdf graph data

て烟熏妆下的殇ゞ 提交于 2019-12-11 01:27:41

问题


I'm new to sparql. Can anyone tell me how I can delete an rdf graph data (eg: http://mylocalhost.com/owl/file.owl) in virtuoso. Following is how I created it:

db.dba.rdf_load_rdfxml_mt(file_to_string_output('/data/file.owl'), '', 'http://example.com/file.owl');

I did the sparql clear graph <uri> and sparql drop graph <uri>, but didn't work. Many thanks in advance


回答1:


Note that CLEAR GRAPH, and DROP GRAPH are SPARQL Update operations, so you might need to use a different method, or endpoint, I'm not familiar with how Virtuoso works.




回答2:


Notice that clearing the graphs does not necessarily free up space. You will notice that the main virtuoso.db file size may remain the same after the deletion.

If you need to delete all the RDF triples (start a clear database), you can delete (or rename) the db folder that virtuoso operates on.

Restart virtuoso, and you will notice that it will create a clean database.

It is a hacky way, but works well!



来源:https://stackoverflow.com/questions/6736107/delete-rdf-graph-data

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!