Skip to content

dpapathanasiou/simple-graph

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
December 31, 2022 14:42

About

This is a simple graph database in SQLite, inspired by "SQLite as a document database".

Structure

The schema consists of just two structures:

  • Nodes - these are any json objects, with the only constraint being that they each contain a unique id value
  • Edges - these are pairs of node id values, specifying the direction, with an optional json object as connection properties

The create, read, update, and delete functions (.sql files) are complete statements with qmark bindings.

Search templates (.template files) are in Jinja2 format, which can be converted to other template syntaxes relatively easily, with a bit of regex magic (though it would be nice if they could be expressed in a more language-agnostic way).

There are also traversal function templates as native SQLite Common Table Expressions which produce lists of identifiers or return all objects along the path.

Applications

Usage

RESTful API (paid)

The Banrai Simple Doc Store service wraps this database core with an API service, creating a no-admin database for both documents and graphs.

Importable library (free)

Choose an implementation:

Want to contribute an implementation in your preferred programming language?

The schema and prepared sql statements can be used by programs in any programming language with SQLite bindings.

Pull requests are welcome!

About

This is a simple graph database in SQLite, inspired by "SQLite as a document database"

Resources

License

Stars

Watchers

Forks

Packages

No packages published