{"id":42358663,"url":"https://github.com/ontodev/ldtab","last_synced_at":"2026-01-27T16:38:04.903Z","repository":{"id":210652756,"uuid":"724721210","full_name":"ontodev/ldtab","owner":"ontodev","description":"Linked Data Tables: General documentation, specifications, and tests","archived":false,"fork":false,"pushed_at":"2024-05-05T17:04:40.000Z","size":30,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-05T18:23:59.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ontodev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-28T16:55:15.000Z","updated_at":"2024-05-05T18:24:01.665Z","dependencies_parsed_at":"2024-05-05T18:24:01.392Z","dependency_job_id":"2d733e5d-f9f3-45aa-99bc-fcaada8262ba","html_url":"https://github.com/ontodev/ldtab","commit_stats":null,"previous_names":["ontodev/ldtab"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ontodev/ldtab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fldtab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fldtab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fldtab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fldtab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ontodev","download_url":"https://codeload.github.com/ontodev/ldtab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ontodev%2Fldtab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28816563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-27T16:38:04.843Z","updated_at":"2026-01-27T16:38:04.892Z","avatar_url":"https://github.com/ontodev.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ldtab: Linked Data Tables\n\n`ldtab` reads an RDF graph and generates a `statements` table like this:\n\nassertion | retraction | graph | subject     | predicate       | object   | datatype | annotation\n----------|------------|-------|-------------|-----------------|----------|----------|------------\n1         | 0          | graph | pizza:Pizza | skos:prefLabel  | Pizza    | @en\t     | \n1         | 0          | graph | pizza:Pizza | rdfs:seeAlso    | \u003chttps://en.wikipedia.org/wiki/Pizza\u003e | _IRI\t|\n1         | 0          | graph | pizza:Pizza | rdfs:label      | Pizza | @en\t|\n1         | 0          | graph | pizza:Pizza | rdfs:subClassOf | {\"owl:onProperty\":[{\"datatype\":\"_IRI\",\"object\":\"pizza:hasBase\"}],\"owl:someValuesFrom\":[{\"datatype\":\"_IRI\",\"object\":\"pizza:PizzaBase\"}],\"rdf:type\":[{\"datatype\":\"_IRI\",\"object\":\"owl:Restriction\"}]} | _JSON\t | \n1         | 0          | graph | pizza:Pizza | rdfs:subClassOf | pizza:Food | _IRI\t|\n1         | 0          | graph | pizza:Pizza | rdf:type        | owl:Class | _IRI |\n\n\nThe design of `ldtab` is still in development. \nA prototype implementation is available in Clojure: [ldtab.clj](https://github.com/ontodev/ldtab.clj).\nThis implementation uses Jena to parse input RDF graphs and supports SQLite and PostgreSQL databases.\n\n## Motivation\n\nThe motivation for `ldtab` is threefold:\n\n1. facilitate work with *large RDF graphs*,\n2. *simplify* certain SPARQL queries for complex RDF structures involving blank nodes,\n3. enable text-based *diffs* between different versions of an RDF graph.\n\nThe following provides more details and examples for each of these goals. \n\n### 1. Querying large RDF Graphs \n\nRDF data consists of subject-predicate-object triples that form a graph.\nWith SPARQL we can perform queries over that graph.\nHowever, loading a large RDF graph into a triplestore for SPARQL can be slow and require a lot of memory (similar issues exist with tools for OWL ontologies).\n\nYet, in many cases the queries we want to run are actually quite simple.\nWe often just want all the triples associated with a set of terms,\nor all the subjects that match a given predicate and object.\nIn these cases, SQLite is both efficient and effective.\nConsider the following examples:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eTask\u003c/th\u003e\n    \u003cth\u003eSQL\u003c/th\u003e\n    \u003cth\u003eSPARQL\u003c/th\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003eGet subjects with labels\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang=\"sql\"\u003eSELECT subject, object AS label\nFROM statements\nWHERE predicate = \"rdfs:label\";\u003c/pre\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang=\"sparql\"\u003eSELECT ?subject, ?label\nWHERE {\n  ?subject rdfs:label ?label .\n}\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003eGet OWL classes with labels\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang=\"sql\"\u003eSELECT s1.subject, s2.object AS label\nFROM statements s1\nJOIN statements s2 ON s2.subject = s1.subject\nWHERE s1.predicate = \"rdf:type\"\n  AND s1.object = \"owl:Class\"\n  AND s2.predicate = \"rdfs:label\";\u003c/pre\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang=\"sparql\"\u003eSELECT ?subject, ?label\nWHERE {\n  ?subject\n    rdf:type owl:Class ;\n    rdfs:label ?label .\n}\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### 2. Simplify Complex Queries \n\nQuerying RDF data for an entity can be annoying and error-prone\nif the entities representation involves complex structures, such as compound OWL class expressions or OWL annotation axioms.\nIn `ldtab`, such queries can be constructed in a straightforward manner:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eTask\u003c/th\u003e\n    \u003cth\u003eSQL\u003c/th\u003e\n    \u003cth\u003eSPARQL\u003c/th\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003eGet all relevant RDF triples for a subject (including nested anonymous structures such as OWL class expressions)\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang=\"sql\"\u003eSELECT *\nFROM statements\nWHERE subject = \"pizza:Pizza\";\u003c/pre\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n    Annoying...\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### 3. Text-based Diffs between RDF Graphs\n\nAn RDF graph can be serialized in many equivalent ways.\nEven for a given concrete syntax, the serialization of an RDF graph is not uniquely determined.\nIn practice, existing tools rarely guarantee to output the exact same serialization (using a single concrete syntax) of a given RDF graph. \nThis makes tracking changes in RDF graphs (or OWL ontologies) using popular version control systems, e.g., git, challenging.\n\n`ldtab` provides support to serialize an RDF graph in a uniquely determined manner, enabling text-based `diff`s in version control systems.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontodev%2Fldtab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fontodev%2Fldtab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fontodev%2Fldtab/lists"}