US 11,947,509 B2
Storing and querying knowledge graphs in column stores
Christian Bensberg, Heidelberg (DE); Jonathan Dees, Karlsruhe (DE); and Markus Fath, Wiesloch (DE)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Aug. 23, 2022, as Appl. No. 17/893,592.
Prior Publication US 2024/0070133 A1, Feb. 29, 2024
Int. Cl. G06F 16/00 (2019.01); G06F 16/22 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 16/221 (2019.01) [G06F 16/2255 (2019.01); G06F 16/2282 (2019.01); G06F 16/2456 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
identifying a plurality of triples corresponding to a knowledge graph, each of the plurality of triples comprising a subject, a predicate, and an object, and wherein the predicate identifies a relationship between the subject and the object;
generating a table in a database into which to import the set of triples, the generating comprising:
generating a subject column in the table, the subject column configured for storing a value of the subject for each of the plurality of triples;
generating a predicate column in the table, the predicate column configured for storing a value of the predicate for each of the plurality of triples;
identifying a plurality of datatypes used by the database; and
generating a plurality of object columns in the table corresponding to the object, wherein each of the plurality of object columns corresponds to a different one of the plurality of possible datatypes and is configured to store a value of the object for each of the plurality of triples;
loading values from the plurality of triples into the table, wherein the loading comprises loading the value of the subject into the subject column, the value of the predicate into the predicate column, and the value of the object into one of the plurality of object columns;
receiving a query on the table, wherein the query comprises one of a SQL (structured query language) query or RDF (resource description framework) query;
executing the query on the table to generate a result; and
returning the result based on the execution of the query.