improved SQLite RDF triple store for Redland librdf http://purl.mro.name/librdf.sqlite/

Marcus Rohrmoser 0bd4c75d5d add git mirrors 4 lat temu
sql 75d421fcf8 fix compiler warnings and stricter compilations (-Wall -Werror) 9 lat temu
test a5515c8442 compare with vanilla sqlite store. 6 lat temu
tools 46f79ca9b0 💄 refs #13 9 lat temu
.gitignore b40e671d71 less indexes. saves 50% space but has low impact on runtime. refs #2 10 lat temu
.travis.yml d74dd7ef31 🌀. 7 lat temu
CHANGELOG.md 487dfb3fd0 Release 0.0.1 10 lat temu
LICENSE 6b53ca31de copyright year 9 lat temu
README.md 565289c4d1 'README.md' ändern 6 lat temu
VERSION 48d4ded329 give cocoapods another try. 9 lat temu
doap.rdf 0bd4c75d5d add git mirrors 4 lat temu
librdf.sqlite.podspec f40450aa25 brush up podfile. 9 lat temu
package.json 3a21a87c1d add a package description for https://github.com/clibs/clib 9 lat temu
rdf_storage_sqlite_mro.c 75cec9d59a fix copy-paste error that caused -DDEBUG build to fail 6 lat temu
rdf_storage_sqlite_mro.h a7080b1b05 Update rdf_storage_sqlite_mro.h 9 lat temu

README.md

Build Status

Improved SQLite RDF triple storage module for librdf.

Cross platform, plain C source file. Comes with a Version for those targeting iOS.

Inspired by the official sqlite store.

Usage

#include "rdf_storage_sqlite_mro.h"
....
librdf_world *world = librdf_new_world();
librdf_init_storage_sqlite_mro(world);  // register storage factory
....
const char* options = "new='yes', contexts='no'";
librdf_storage *newStorage = librdf_new_storage(world, LIBRDF_STORAGE_SQLITE_MRO, file_path, options);

See e.g. in (my) http://purl.mro.name/ios/librdf.objc.

License

Design Goals

Quality very good good normal  irrelevant
Functionality ×
Reliability ×
Usability ×
Efficiency ×
Changeability ×
Portability ×

Currently 50% code and 99% runtime saving (for 100k triples).

  • intense use of SQLite prepared statements and bound values:
    • no stringbuffers
    • no strcpy/memcpy,
    • no SQL escaping,
  • re-use compiled statements where possible (at the cost of thread safety),
  • as few SQL statements as possible (at the cost of some non-trivial ones),
  • SQLite indexes (at the cost of larger DB files).