Is it possible to use redland to perform single/bulk insertions (write into persistent storage) without keeping the graph in memory, and how would you tune such insertions?
Yes. Create a librdf_storage
object where you want your data stored and pass it to librdf_new_model()
. Then use any of the API functions such as librdf_parser_parse_into_model()
to store data in that model and it gets persisted in the storage.
The graph is only kept in memory if the librdf storage module is written that way.
If we forget about the querying, what would be a good persistent way of storage: files or databases?
The file
storage is not really for serious business. It keeps the graph in memory and persists to disk by serializing to/from RDF/XML.
Use a database-backed storage such as mysql
or BDB hashes
.