pg_ripple Blog
Note: Blog posts were written with AI assistance (GitHub Copilot / Claude) as a way to explore LLM-generated technical writing for a niche systems engineering topic. The technical content has been reviewed for accuracy, but treat posts as drafts rather than officially reviewed documentation.
The full blog lives in the repository under blog/.
Individual posts are linked below.
Core Concepts & Architecture
| Post | Summary |
|---|---|
| Why RDF Inside PostgreSQL? | The case for a triple store that lives where your data already is — no ETL pipeline, no separate cluster, no impedance mismatch. |
| Vertical Partitioning: One Table Per Predicate | Inside pg_ripple's VP storage model and why it beats a single (s, p, o) table by 10–100× for selective queries. |
| Everything Is an Integer | Dictionary encoding with XXH3-128: why string comparisons in a triple store are a performance bug. |
| How SPARQL Becomes a PostgreSQL Query Plan | The translation pipeline from SPARQL text to spargebra algebra to SQL to SPI execution. |
Storage & Performance
| Post | Summary |
|---|---|
| HTAP for Triples: Reads and Writes at the Same Time | The delta/main/tombstone split that lets pg_ripple handle concurrent OLTP writes and analytical SPARQL queries without locking. |
| Leapfrog Triejoin: When Triangle Queries Meet Optimal Joins | Worst-case optimal joins compiled into PostgreSQL — what a 10–100× speedup looks like in practice. |
| Property Paths Are Just Recursive CTEs | SPARQL property paths compiled to WITH RECURSIVE … CYCLE using PostgreSQL 18's hash-based cycle detection. |
Reasoning & Inference
| Post | Summary |
|---|---|
| Datalog Inside PostgreSQL | Automatic fact derivation from rules — RDFS, OWL RL, transitive closure, all running as SQL. |
| Magic Sets: Ask a Question, Infer Only What You Need | Goal-directed inference: the difference between 2 million inferred triples and 47. |
| owl:sameAs Without the Explosion | Entity canonicalization at query time using union-find over owl:sameAs chains. |
| The Four Built-in Rule Sets | What RDFS, OWL RL, OWL EL, and OWL QL actually do — every rule explained with examples. |
| Well-Founded Semantics | Why stratified negation isn't always enough, and how well-founded semantics handles recursive negation. |
| OWL Property Chain Axioms | Compiling owl:propertyChainAxiom to recursive SQL joins. |
Data Quality & Validation
| Post | Summary |
|---|---|
| SHACL: Schema Validation for the Schema-Less | How pg_ripple compiles SHACL shapes into DDL constraints and async validation pipelines. |
AI, RAG & Vector Search
| Post | Summary |
|---|---|
| Vector + SPARQL Hybrid Search | Combining pgvector approximate nearest-neighbour search with SPARQL graph traversal. |
| Natural Language to SPARQL | LLM-powered NL→SPARQL translation with few-shot prompting. |
| GraphRAG Knowledge Export | Exporting pg_ripple graphs for Microsoft's GraphRAG pipeline. |
| Neuro-Symbolic Entity Resolution | Combining ML embeddings with Datalog rules for record linkage. |
Integrations & Operations
| Post | Summary |
|---|---|
| CDC → Knowledge Graph | Streaming relational change events into the RDF graph via logical replication. |
| Citus Shard Pruning for SPARQL | How the SERVICE clause dispatches federated SPARQL queries to the right shard. |
| IVM with pg-trickle Integration | Incremental view maintenance over CDC streams. |
| Semantic Hub: pg-tide Relay | Hub-and-spoke topology for multi-instance RDF synchronisation. |
| GDPR Right to Erasure | Implementing GDPR article 17 — cascading triple deletion with provenance tracking. |
| Multi-Tenant Knowledge Graphs | Named-graph isolation, row-level security, and per-tenant dictionaries. |
Advanced Features
| Post | Summary |
|---|---|
| CONSTRUCT Views: Live Transformations | SPARQL CONSTRUCT rules as materialised views with automatic delta propagation. |
| JSON-LD Framing and Nested JSON | Turning a flat triple store into structured nested JSON documents on demand. |
| JSON-LD Reverse Mapping | Writing RDF changes back to relational tables via JSON-LD contexts. |
| R2RML: Relational to Graph | Mapping relational tables to RDF using the W3C R2RML standard. |
| RDF-star: Statements About Statements | Annotating individual triples for provenance, confidence, and temporal metadata. |
| Temporal Graph Snapshots | Point-in-time named graphs for audit trails and time-travel queries. |
| Temporal Time-Travel Queries | Querying historical states of the knowledge graph. |
| Allen's Interval Relations | Temporal reasoning using Allen's thirteen interval relations in Datalog. |
| GeoSPARQL + PostGIS | Spatial queries over RDF geometry literals using the GeoSPARQL 1.1 extension. |
| SKOS Knowledge Organization | Managing thesauri, concept schemes, and taxonomies with SKOS in pg_ripple. |
| Graph Analytics with PageRank | Datalog-native PageRank with incremental view maintenance, WCOJ, and Prometheus gauges. |
| Probabilistic Datalog | Uncertain knowledge: noisy-OR, confidence propagation, and soft constraints. |
| Provenance Tracking with PROV-O | Recording data lineage using the W3C PROV-O ontology. |
| Ontology Mapping and Alignment | Bridging heterogeneous vocabularies with owl:equivalentClass and SPARQL CONSTRUCT rules. |
| SPARQL Federation: Local + Remote | Mixing local VP table scans with remote SPARQL endpoints in a single query. |
| EXPLAIN SPARQL: Query Plans | Reading pg_ripple's query plan output to diagnose slow SPARQL queries. |
| Rule Library Federation | Publishing and subscribing to shared Datalog rule libraries across pg_ripple instances. |
| Federation Circuit Breakers | Resilient federated queries with circuit breakers, timeouts, and fallback graphs. |
| DCTERMS, Schema.org, and FOAF Bundles | Built-in vocabulary bundles for common ontologies. |
| Uncertain Knowledge | Probabilistic Datalog in PostgreSQL: representing and querying uncertain facts. |