KGDB: Knowledge Graph Database System with Unified Model and Query Language

Baozhu Liu, Xin Wang, Pengkai Liu, Sizhuo Li, Xiaowang Zhang, Yajun Yang

Bridging the Semantic Silo

In the landscape of modern data management, a significant divide exists between two dominant graph paradigms: the Resource Description Framework (RDF) and Property Graphs (PG). RDF, a cornerstone of the Semantic Web, utilizes a formal triple-based structure (subject-predicate-object) that excels in data exchange and logical reasoning. In contrast, Property Graphs offer a more intuitive model where nodes and edges can possess arbitrary key-value attributes, making them the preferred choice for industrial applications requiring flexible schemas and high-performance traversals.

An example of a Property Graph (PG) model, featuring nodes with attributes and directed edges.

Historically, organizations have been forced to choose one model, thereby inheriting its specific query languages (SPARQL for RDF, Cypher for PG) and specialized storage engines. This "semantic silo" complicates interoperability and increases management overhead. Researchers from Tianjin University have addressed this challenge with KGDB, a unified knowledge graph database system that provides a single relational-based storage engine and a compatible query interface for both worlds.

The KGDB Technical Route

KGDB is built upon a "unified storage–compatible grammar–unified semantics" technical route. This approach ensures that regardless of the input format, data is stored efficiently and can be queried using either SPARQL or Cypher with consistent results.

The technical route of KGDB, illustrating the unified storage and query processing for RDF and Property Graphs.

Unified Relational Storage

A primary innovation in KGDB is its departure from the traditional "giant triple table" approach used by many RDF stores. Instead, KGDB "shreds" graphs into optimized relational tables based on entity and relationship types. Vertex Tables store unique identifiers and their associated properties, while Edge Tables record the connections between nodes along with any edge-specific attributes. This mapping allows the system to leverage decades of optimization in relational database technology.

CS-Based Clustering for Untyped Data

One of the most difficult hurdles in unifying RDF and PG is the presence of "untyped" entities in RDF. KGDB solves this using Characteristic Sets (CS), which group entities based on the set of predicates they share. By clustering semantically similar untyped entities into organized tables rather than a single catch-all bucket, KGDB minimizes the number of joins required for complex queries, significantly boosting performance.

Semantic Alignment and Query Interoperability

To achieve language interoperability, KGDB treats SPARQL and Cypher as different grammatical representations of the same underlying relational logic. The system parses both languages into a common Relational Algebra tree. By focusing on the shared semantics of Basic Graph Pattern (BGP) matching, KGDB allows a Cypher query to run seamlessly on data originally imported as RDF triples, ensuring that the same query results are achieved regardless of the interface used.

Experimental Evaluation

The researchers benchmarked KGDB against gStore (a specialized RDF engine) and Neo4j (the industry-standard Property Graph database) using the LUBM and DBpedia datasets.

  • Storage Efficiency: KGDB achieved a 30% reduction in storage space compared to its peers, thanks to its typed table structure and dictionary encoding.
  • Import and Query Speed: The system demonstrated import speeds up to 10 times faster than existing solutions. In query performance, particularly on the real-world DBpedia dataset, KGDB was often two orders of magnitude (100x) faster than Neo4j for specific optimal query patterns.

Conclusion

KGDB represents a significant step toward a unified graph data ecosystem. By providing a high-performance, relational-backed engine that supports both RDF and Property Graphs, it eliminates the need for redundant systems and complex data translations. Future developments will focus on transitioning KGDB to a distributed architecture to support the massive scale of global knowledge graphs and enhancing its native reasoning capabilities.

Summary based on research by the Tianjin University team.

Summary updated

BibTeX
@article{liu2021kgdb,
  author = {Baozhu Liu and Xin Wang and Pengkai Liu and Sizhuo Li and Xiaowang Zhang and Yajun Yang},
  title = {{KGDB: Knowledge Graph Database System with Unified Model and Query Language}},
  journal = {Int. J. Softw. Informatics},
  year = {2021},
  doi = {10.21655/ijsi.1673-7288.00243},
}
Figure