Blog Post Kevin Doubleday08.02.23

RDF Versus LPG: Which is better for Knowledge Graphs?

A simple comparison of Labeled Property Graphs and RDF for knowledge graphs

Knowledge graphs are powerful frameworks for organizing, linking, and sharing data with universal meaning. There is an ongoing debate about which graph data model is best, and in this blog post, we’ll explore why RDF (Resource Description Framework) stands out as the superior choice for building more sustainable and scalable knowledge graphs over LPG (Labeled Property Graphs). Let’s dive into the reasons that make RDF shine as the backbone of knowledge graphs.

RDF Versus LPG: A comparison

In RDF, data is represented as triples that consist of subject, predicate, and object. These are known RDF statements, i.e. “Alice is a Friend of Jack.” These triples form a directed graph, with the subject and object as nodes and the predicate as labeled edge. LPG uses nodes to represent data elements and labeled edges to connect nodes. Each edge represents a relationship between nodes, and nodes can have properties associated with them.

In the RDF world, the above graph would be comprised of the following set of triple statements:

Subject | Predicate | Object

Jill | Likes | Artwork

Jill | Is a Friend of | Jack

Jack | Is a Friend of | Kevin

Kevin | Likes | Artwork

There are some key differences that make RDF a better choice for enterprise knowledge graphs. Let’s explore:

Why do these differences matter?  

While LPGs can certainly be useful for graph analytics use cases, they lack key features to make data accessible and useful when it comes to the need for interoperability and scale. Specifically, LPGs lack robust support for ontologies, schema standardization, and semantic standards – all characteristics of a sustainable knowledge graph initiative. Let’s explore:

  • Graph Formalism: RDF is based on a solid structure and follows some essential rules set by the World Wide Web Consortium (W3C). It’s simple and works well with existing data sources and applications. On the other hand, labeled property graphs lack standardization, which can create inconsistencies in how they are used and integrated with other data.
  • Semantic Expressiveness: One of the best things about RDF is that it can express meaning explicitly. It uses subject-predicate-object statements, which allow for rich and precise representation of knowledge. This means that knowledge from different areas can be connected and analyzed more effectively. In contrast, labeled property graphs may struggle to represent complex knowledge and perform advanced analyses.
  • Scalability: Knowledge graphs can become very large, with millions or billions of interconnected elements. RDF databases are designed to handle this level of scale, and some of them can distribute the work across multiple servers to make it faster. This scalability is crucial for organizations dealing with large volumes of distributed data. On the other hand, labeled property graphs might face challenges in managing and analyzing massive databases.
  • Open World Assumption: RDF operates on the Open World Assumption, which means that it allows for information that is not yet known or incomplete. RDF allows for new information to be added without having to change what’s already there. In contrast, labeled property graphs assume that what’s not known is false, which might not be accurate in many situations.
  • Linked Data: RDF aligns with the ideas and protocols behind Linked Data. Specifically, RDF can enable the connection of data from different sources using unique identifiers without massive integration overhead . This interconnectedness allows for a vast network of knowledge that spans across various domains – a key requirement for knowledge graphs. While labeled property graphs can also link data, RDF’s standardized approach provides more opportunities for cross-domain interoperability and integration. 

When LPG Makes Sense

It’s worth exploring the distinctive advantages of labelled property graphs (LPGs) within specific contexts.

Properties of Properties:

In the world of LPGs, edges can bear their own properties, allowing for the inclusion of valuable metadata such as the source of information, date of assertion, and confidence level. This can be emulated with objects in standard RDF but unfortunately there is a performance cost. A better approach is RDF-* and SPARQL-*, which is about to be standardized, and is already supported by several RDF databases.

Property Path Discovery:

LGPs have an advantageous ability to traverse the shortest path between two nodes, which is valuable for unraveling complex relationships and uncovering hidden insights. While this may not be a pivotal concern for all domains, it holds particular significance for those where relationships are multi-faceted and require in-depth exploration. This is only important for certain domains, such as social networks, so it is of limited importance. However, there is nothing about property graphs that is special here, as it’s just a function of the query language. Unfortunately, SPARQL doesn’t include this, but any RDF database (including Fluree) can implement this operation, if the application demands for it.

It’s important to note that LPGs shine brightest in these limited scenarios where edge properties and path discovery are paramount. The beauty of the RDF ecosystem lies in its versatility and adaptability. The introduction of RDF-* and SPARQL-* speaks to the growing recognition of these specialized features within the RDF paradigm.

Conclusion

When it comes to data management, choosing the right tool for the job is best practice. If your graph use case is heavily analytical within a closed environment and demands “properties of properties,” LGP may play a role. But if your knowledge graph demands interoperability, integration, and sharing across boundaries, RDF is the clear format of choice to future-proof your data across its value chain.

The most valuable knowledge graphs are flexible and dynamic, adapting to new data types, consumer patterns, and business requirements. To meet these demands, Knowledge Graphs must leverage the benefits of semantic standards and “open world” assumptions that RDF provides.

If you’re looking for a native RDF-native graph database, Fluree is an excellent choice for knowledge graph initiatives. With Fluree, your knowledge graph can expand across domains, power any number of applications, and extend both “read” and “write” capabilities to permissioned users.