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

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

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).