SkillAgentSearch skills...

GStore

gStore - a graph based RDF triple store.

Install / Use

/learn @pkumod/GStore
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <img src="https://www.gstore.cn/pcsite/docs/logo.png" style="height: 200px;" alt="gStore logo"/> </div>

[English] | 中文 | Website | 网站

<div align="center"> <a href="https://github.com/pkumod/gStore/commits/1.2/"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/pkumod/gstore?logo=github"/></a> <a href="https://github.com/pkumod/gStore/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors-anon/pkumod/gstore?logo=github&color=%23ffd664"/></a> <a href="https://hub.docker.com/repository/docker/pkumodlab/gstore-docker/general"><img alt="Docker Image Version (V1.2)" src="https://img.shields.io/docker/v/pkumod/gstore?logo=docker&label=docker&color=%2328a8ea"/></a> <span><img alt="Static Badge" src="https://img.shields.io/badge/arch-x86_amd64_arm64_loongarch-%23f23f46?logo=amazonec2"></span> </div>

gStore is an open-source graph database engine (or "triple store") born for managing large RDF datasets with the SPARQL query language. It works with Linux systems and amd64, arm64, and loongarch processors. gStore is a collaborative effort between the Data Management Lab of Peking University, University of Waterloo, and awesome contributors from the open-source community.

:key: gStore is released under the BSD 3-Caluse License, with several third-party libraries under their own licenses. Check LICENSE for details.

:bug: Check out FAQ for frequently asked questions. Known bugs and limitations are listed in BUGS and LIMIT. If you find any bugs, please feel free to open an issue.

:microphone: If you have any questions or suggestions, please open a thread in GitHub Discussions.

:book: For recommendations, project roadmap, and more, check online documentation.

The formal help document is in English(EN) and 中文(ZH).

The formal experiment result is in Experiment.

We have built an IRC channel named #gStore on freenode, and you can visit the homepage of gStore.

Get gStore

gStore has been uploaded to gitee (code cloud), which is recommended for faster download for users in mainland China. The website is https://gitee.com/PKUMOD/gStore.

You can also open https://github.com/pkumod/gStore, download gStore.zip, then decompress the zip package.

From Docker

$ docker pull pkumodlab/gstore-docker:latest

Complete instruction documentation is on the Docker Deployment Instructions.

From Source

To compile gStore, first clone the repository:

git clone https://github.com/pkumod/gStore.git

Complete instruction documentation is on the Installation Instructions.

Quick Start

N-Triple Data format introduction

​ RDF data should be provided in n-triple format (XML is not currently supported), and queries must be provided in SPARQL1.1 syntax. The following is an example of the n-triple format file:

@prefix foaf:  <http://xmlns.com/foaf/0.1/> .	
_:a  foaf:name   "Johnny Lee Outlaw" .
_:a  foaf:mbox   <mailto:jlow@example.com> .
_:b  foaf:name   "Peter Goodguy" .
_:b  foaf:mbox   <mailto:peter@example.org> .
_:c  foaf:mbox   <mailto:carol@example.org> .

Triples are typically stored in the W3C-defined NT file format and represent three RDF data, where the values wrapped in < and >are urIs of an entity, and the values wrapped in '"" are literals representing the value of an attribute of the entity, followed by'^^ to indicate the type of the value. The following three RDF data points represent two attributes of John, gender and age, with values of male and 28 respectively. The last one indicates that John and Li have a friend relationship.

<John> <gender> "male"^^<http://www.w3.org/2001/XMLSchema#String>.
<John> <age> "28"^^<http://www.w3.org/2001/XMLSchema#Int>.
<John> <friend> <Li>.

​ More specific information about N-Triple please check N-Triple. Not all syntax in SPARQL1.1 is parsed and answered in gStore; for example, property paths are beyond the capabilities of the gStore system.

Initialize the system database

bin/ginit

Create database

bin/gbuild -db lubm -f data/lubm/lubm.nt 

Database list

bin/gshow

Database query

bin/gquery -db lubm -q data/lubm/lubm_q0.sql 

Complete instruction documentation is on the Quick Start.

Cite gStore

If you use gStore in your research, please cite the following paper:

@article{zou2014gstore,
  title={gStore: a graph-based SPARQL query engine},
  author={Zou, Lei and {\"O}zsu, M Tamer and Chen, Lei and Shen, Xuchuan and Huang, Ruizhe and Zhao, Dongyan},
  journal={The VLDB journal},
  volume={23},
  pages={565--590},
  year={2014},
  publisher={Springer}
}

Or cite this repository:

@misc{gStore,
  author = {gStore Authors},
  title = {gStore},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/pkumod/gStore}},
}

Change log

1.4(stable):2025-12-01

New features in gStore 1.4 are listed as follows:

  • Reconstructing the bin directory structure: Retain only the gserver service and gconsole operation modes.
  • Added Task operation management module: Support to cancel time-consuming query operations
  • Reconstruct the memory management mechanism: By adopting an on-demand memory block application mechanism, the memory copying process is reduced, and the efficiency of batch addition is increased by more than 100%
  • Refactoring the custom function module: Added the built-in function pfn.fun_name, supporting select calls
  • Added static gcc installation package: Supports the use of custom functions
    • Added rpm and deb packages: Support the rpm and dpkg commands to install gstore
  • Optimize data update logic : By using multi-threading to handle the mapping between id2string and string2id, as well as the reconstruction of StringIndex, the update efficiency has been doubled
    • Optimize database construction logic : Adopt a parallel processing mechanism to increase efficiency by 30%
  • Optimize subquery doJoin operations : Use cached data operations to reduce I/O
    • Added built-in advanced functions : Added two advanced functions, namely: All shortest paths (shortestPaths), all K-hop neighbors (kHopAllNeighbors),Text SIMILARITY(SIMILARITY)
  • Several new API interfaces have been added:such as loading CSR resources (loadcsr) and obtaining Schema information (schema)
    • Optimize API interfaces : Build, load, unload, backup, restore and other interfaces support asynchronous mode
    • Support for generating schema: Supports building interfaces and batch insertion of data interfaces, and building to generate schema information
    • Support controllable loading of transaction memory: Support the selection and loading of transaction initialization memory by passing parameters
    • Bug Fixes: Fixed a series of bugs,Frequent addition or deletion of the same batch of data can cause the problem of continuous expansion of disk space

1.3(stable):2024-08-30

New features in gStore 1.3 are listed as follows:

  • Directory Structure Refactoring: Refactored the directory structure and optimized the compilation method, improving compilation efficiency by 30%.
  • New Inference Engine Module: Supports dynamic management and real-time invocation of inference rules, and supports property inference and relationship inference based on ontology models.
  • New Built-in Advanced Functions: Added four advanced functions: Diameter Estimation (diameterEstimation), Betweenness Centrality (betweennessCentrality), Jaccard Similarity (JaccardSimilarity), and Degree Correlation (degreeCorrelation).
  • New Aggregate Function SAMPLE: Supports calling in SELECT queries.
  • New API Interfaces: Added checkOperationState and reasonManage interfaces.
  • Kernel Logging Refactor: Supports configuration of five logging levels and expression-based logging content configuration.
  • Optimization of CSR Resource Update Mechanism: CSR resources are dynamically updated based on query needs after data updates.
  • Cache Management Optimization: Optimized the issue where system caches were not being actively released, leading to excessive server memory consumption.
  • Data Update Logic Optimization: Improved the logic for batch addition and deletion of data, increasing execution efficiency by more than 40%.
  • Added Data Compression Mechanism: The HTTP API now supports gzip compression, reducing data transfer size to within 20% of the original data, and shortening data transmission time.
  • API Interface Optimization: Added asynchronous mode and callback mode to some time-consuming interfaces.
  • Local Command Optimization: Optimized local commands, such as build, batch add, and delete, with support for zip file types.
  • Bug Fixes: Fixed a series of bugs.

1.2(stable):2023-11-11

New features in gStore 1.2 are listed as fol

View on GitHub
GitHub Stars835
CategoryDevelopment
Updated12h ago
Forks212

Languages

C++

Security Score

95/100

Audited on Mar 27, 2026

No findings