문제

I went over the redland documentation and there are some problems I couldn't be certain of solving.

Looking on a c++ side, suppose you generate numerous rdf triples over time for several different graphs, and knowing it is not interested a primary interest to have all graphs in memory:

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?

If we forget about the querying, what would be a good persistent way of storage: files or databases?

What do you think?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top