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

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

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