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

Marcus Rohrmoser 59d9eda8e8 Release 0.0.3 před 11 roky
add b40e671d71 less indexes. saves 50% space but has low impact on runtime. refs #2 před 11 roky
tools 0c27f22586 bashism—- před 11 roky
.gitignore b40e671d71 less indexes. saves 50% space but has low impact on runtime. refs #2 před 11 roky
CHANGELOG.md 487dfb3fd0 Release 0.0.1 před 11 roky
LICENSE 631e096099 add a cocoapod, refs #5 před 11 roky
README.md d989811ef0 readme. před 11 roky
Rakefile 631e096099 add a cocoapod, refs #5 před 11 roky
VERSION ebc3cb75f6 Release 0.0.3 před 11 roky
find_triples.sql c1085951f3 hashed find. refs #2 před 11 roky
insert_triple.sql e088ed184f hashed insert (add statement(s)). refs #2 před 11 roky
librdf.sqlite.podspec 631e096099 add a cocoapod, refs #5 před 11 roky
rdf_storage_sqlite_mro.c ffff2fedd4 proper hash combine. fixes #6 před 11 roky
rdf_storage_sqlite_mro.h ed0b3fe86e initial před 11 roky
schema_mig_to_1.sql b40e671d71 less indexes. saves 50% space but has low impact on runtime. refs #2 před 11 roky

README.md

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_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) https://github.com/mro/librdf.objc.

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