This document provides an overview of custom mappings in R2RML (RDF Mapping Language). It discusses how R2RML allows users to write custom mappings to map data from relational databases and other sources into RDF. The document covers key R2RML concepts like logical tables, triples maps, and predicate-object maps. It also provides examples of common mapping patterns for simple tables, views, linking multiple tables, and handling many-to-many relationships. Custom mappings in R2RML give users flexibility to model their data in RDF according to their needs.
Two graph data models : RDF and Property Graphsandyseaborne
Talk given at ApacheConEU Big Data 2015.
This talk describes the two common graph data approaches, RDF and Property Graphs. It concludes with observations about the different emphasis of each and where each is focused.
Although RDF can be considered the corner stone of semantic web and knowledge graphs, it has not been embraced by everyday programmers and software architects who want to safely create and access well-structured data. There is a lack of common tools and methodologies that are available in more conventional settings to improve data quality by defining schemas that can later be validated. Two technologies have recently been proposed for RDF validation: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL). In the talk, we will briefly introduce both technologies using some examples and compare them. We will also present some challenges and applications related with RDF data shapes.
Talk given at: KTH Royal Institute of Technology, School of Industrial Engineering and Management, Mechatronics Division, 7th February, 2020
Two graph data models : RDF and Property Graphsandyseaborne
Talk given at ApacheConEU Big Data 2015.
This talk describes the two common graph data approaches, RDF and Property Graphs. It concludes with observations about the different emphasis of each and where each is focused.
Although RDF can be considered the corner stone of semantic web and knowledge graphs, it has not been embraced by everyday programmers and software architects who want to safely create and access well-structured data. There is a lack of common tools and methodologies that are available in more conventional settings to improve data quality by defining schemas that can later be validated. Two technologies have recently been proposed for RDF validation: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL). In the talk, we will briefly introduce both technologies using some examples and compare them. We will also present some challenges and applications related with RDF data shapes.
Talk given at: KTH Royal Institute of Technology, School of Industrial Engineering and Management, Mechatronics Division, 7th February, 2020
Mapping Hierarchical Sources into RDF using the RML Mapping Languageandimou
Incorporating structured data in the Linked Data cloud is still complicated, despite the numerous existing tools. In particular, hierarchical structured data (e.g., JSON) are underrepresented, due to their processing complexity. A uniform mapping formalisation for data in different formats, which would enable reuse and exchange between tools and applied data, is missing. This paper describes a novel approach of mapping heterogeneous and hierarchical data sources into RDF using the RML mapping language, an extension over R2RML (the W3C standard for mapping relational databases into RDF). To facilitate those mappings, we present a toolset for producing RML mapping files using the Karma data modelling tool, and for consuming them using a prototype RML processor. A use case shows how RML facilitates the mapping rules’ definition and execution to map several heterogeneous sources.
http://rml.io
https://github.com/mmlab/RMLProcessor
Although RDF is a corner stone of semantic web and knowledge graphs, it has not been embraced by everyday programmers and software architects who need to safely create and access well-structured data. There is a lack of common tools and methodologies that are available in more conventional settings to improve data quality by defining schemas that can later be validated. Two technologies have recently been proposed for RDF validation: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL). In the talk, we will review the history and motivation of both technologies. We will also and enumerate some challenges and future work with regards to RDF validation.
RDF is a general method to decompose knowledge into small pieces, with some rules about the semantics or meaning of those pieces. The point is to have a method so simple that it can express any fact, and yet so structured that computer applications can do useful things with knowledge expressed in RDF.
Lightening talk for Semantic Web in Libraries (SWIB13) conference at 2013-11-27 about another method of expressing RDF data. See http://gbv.github.io/aREF/ for a preliminary specification.
Mapping Hierarchical Sources into RDF using the RML Mapping Languageandimou
Incorporating structured data in the Linked Data cloud is still complicated, despite the numerous existing tools. In particular, hierarchical structured data (e.g., JSON) are underrepresented, due to their processing complexity. A uniform mapping formalisation for data in different formats, which would enable reuse and exchange between tools and applied data, is missing. This paper describes a novel approach of mapping heterogeneous and hierarchical data sources into RDF using the RML mapping language, an extension over R2RML (the W3C standard for mapping relational databases into RDF). To facilitate those mappings, we present a toolset for producing RML mapping files using the Karma data modelling tool, and for consuming them using a prototype RML processor. A use case shows how RML facilitates the mapping rules’ definition and execution to map several heterogeneous sources.
http://rml.io
https://github.com/mmlab/RMLProcessor
Although RDF is a corner stone of semantic web and knowledge graphs, it has not been embraced by everyday programmers and software architects who need to safely create and access well-structured data. There is a lack of common tools and methodologies that are available in more conventional settings to improve data quality by defining schemas that can later be validated. Two technologies have recently been proposed for RDF validation: Shape Expressions (ShEx) and Shapes Constraint Language (SHACL). In the talk, we will review the history and motivation of both technologies. We will also and enumerate some challenges and future work with regards to RDF validation.
RDF is a general method to decompose knowledge into small pieces, with some rules about the semantics or meaning of those pieces. The point is to have a method so simple that it can express any fact, and yet so structured that computer applications can do useful things with knowledge expressed in RDF.
Lightening talk for Semantic Web in Libraries (SWIB13) conference at 2013-11-27 about another method of expressing RDF data. See http://gbv.github.io/aREF/ for a preliminary specification.
This course is a quick overview of the fundamentals of graph databases and graph queries, with a focus on RDF and SPARQL. It includes both simple and challenging hands-on exercises to practice and test your understanding.
The material for this course can be downloaded form the following link: https://github.com/paolo7/Introduction-to-Graph-Databases
Tutorial on RDFa, to be held at ISWC2010 in Shanghai, China. (I was supposed to hold the tutorial but last minute issues made it impossible for me to travel there...)
Triplewave: a step towards RDF Stream Processing on the WebDaniele Dell'Aglio
The slides of my talk at INSIGHT Centre for Data Analytics (in NUI Galway) where I presented TripleWave (http://streamreasoning.github.io/TripleWave/), an open-source framework to create and publish streams of RDF data.
This is a lecture note #10 for my class of Graduate School of Yonsei University, Korea.
It describes SPARQL to retrieve and manipulate data stored in Resource Description Framework format
The Semantic Web is about to grow up. By efforts such as the Linked Open Data initiative, we finally find ourselves at the edge of a Web of Data becoming reality. Standards such as OWL 2, RIF and SPARQL 1.1 shall allow us to reason with and ask complex structured queries on this data, but still they do not play together smoothly and robustly enough to cope with huge amounts of noisy Web data. In this talk, we discuss open challenges relating to querying and reasoning with Web data and raise the question: can the emerging Web of Data ever catch up with the now ubiquitous HTML Web?
A tutorial on how to create mappings using ontop, how inference (OWL 2 QL and RDFS) plays a role answering SPARQL queries in ontop, and how ontop's support for on-the-fly SQL query translation enables scenarios of semantic data access and data integration.
OXFORD 2013, Presentation on the query rewriting approach taken in ontop/Quest. Separating reasoning with respect to hierarchies and existential constants using mapping transformation techniques and a specialised query rewriting algorithm
A presentation on my early work on the Mastro system. Some of this research is now part of the ontop system, some evolved into more optimised forms (also in ontop).
First talk where I introduce the semantic index technique for query answering with inferences, the T-mappings technique (a mapping transformation/optimisation technique to avoid exponential blows during query rewriting) and the role of dependencies in query answering by query rewriting.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
2. +
Disclaimer
License
This work is licensed under the Creative Commons
Attribution-Share Alike 3.0 License
http://creativecommons.org/licenses/by-sa/3.0/
5. +
Combining Information
Most common information
storage
Relational DBs
XML
Comma/Tab delimited
files/spreadsheets
Proprietary file formats
Common Data Model: RDF and
SWT can provide can make it
easier to integrate across all
formats (not replace)
Knowledge Model: RDFS, OWL
and SWRL can make it easier to
integrate under a common
knowledge model
6. +
Combining Information
Tools and techniques for different data sources. In particular:
Relational DBMS
R2RML and Direct Mapping
ontop, D2RQ Server
Java Objects as RDF
XML and XML feeds (web services) as RDF
7. +
Standards and Tools
Mapping languages
Standards by RDB2RDF working group (W3C)
Direct Mapping
R2RML
Proprietary
Tools
Free: D2R, Virtuoso, Morph, r2rml4net, db2triples, ultrawrap,
Quest
Commercial: Virtuoso, ultrawrap, Oracle SW
9. +
R2RML Overview
An R2RML mapping refers to logical tables to retrieve data from
the input database. A logical table can be one of the following:
A base table,
a view, or
a valid SQL query (called an “R2RML view” because it emulates a SQL
view without modifying the database).
Each logical table is mapped to RDF using a triples map. The
triples map is a rule that maps each row in the logical table to a
number of RDF triples. The rule has two main parts:
A subject map that generates the subject of all RDF triples that will be
generated from a logical table row. The subjects often are IRIs that are
generated from the primary key column(s) of the table.
Multiple predicate-object maps that in turn consist of predicate maps
and object maps (or referencing object maps).
10. +
R2RML Overview
Triples are produced by combining the subject map with a
predicate map and object map, and applying these three to
each logical table row. For example, the complete rule for
generating a set of triples might be:
Subjects: A template http://data.example.com/employee/{empno} is
used to generate subject IRIs from the empno column.
Predicates: The constant vocabulary IRI ex:name is used.
Objects: The value of the ename column is used to produce an RDF
literal.
By default, all RDF triples are in the default graph of the output
dataset. A triples map can contain graph maps that place some or all
of the triples into named graphs instead.
12. +
Example
<http://data.example.com/employee/7369> rdf:type ex:Employee.
<http://data.example.com/employee/7369> ex:name "SMITH".
<http://data.example.com/employee/7369> ex:department
<http://data.example.com/department/10>.
<http://data.example.com/department/10> rdf:type ex:Department.
<http://data.example.com/department/10> ex:name "APPSERVER".
<http://data.example.com/department/10> ex:location "NEW YORK".
<http://data.example.com/department/10> ex:staff 1.
Note in particular:
• Construction of custom IRI identifiers for departments and employees;
• use of a custom target vocabulary (ex:Employee, ex:location etc.);
• the ex:staff property has the total number of staff of a department; this
value is not stored directly in the database but has to be computed.
• the ex:department property relates an employee to their department,
using the identifiers of both entities;
19. +
Many to Many relations
<http://data.example.com/employee=7369/department=10>
ex:employee <http://data.example.com/employee/7369> ;
ex:department <http://data.example.com/department/10> .
<#TriplesMap3>
Note that this models the case where
rr:logicalTable [ rr:tableName "EMP2DEPT" ];
the subject identifies each row
rr:subjectMap [ rr:template "http://data.example.com/employee={EMPNO}/department={DEPTNO}" ];
(composite)
rr:predicateObjectMap [
rr:predicate ex:employee;
rr:objectMap [ rr:template "http://data.example.com/employee/{EMPNO}" ];
];
rr:predicateObjectMap [
rr:predicate ex:department;
rr:objectMap [ rr:template "http://data.example.com/department/{DEPTNO}" ];
].
The mapping
20. +
Many to Many relations (alt)
Expected output
<http://data.example.com/employee/7369>
ex:department <http://data.example.com/department/10> ;
ex:department <http://data.example.com/department/20> .
<http://data.example.com/employee/7400>
ex:department <http://data.example.com/department/10>.
21. +
Many to Many relations (alt)
<http://data.example.com/employee/7369>
ex:department <http://data.example.com/department/10> ;
ex:department <http://data.example.com/department/20> .
<http://data.example.com/employee/7400>
ex:department <http://data.example.com/department/10>.
<#TriplesMap3>
rr:logicalTable [ rr:tableName "EMP2DEPT" ];
rr:subjectMap [
rr:template "http://data.example.com/employee/{EMPNO}";
];
rr:predicateObjectMap [
rr:predicate ex:department;
rr:objectMap [ rr:template "http://data.example.com/department/{DEPTNO}" ];
].
The mapping
22. +
Many to Many relations (alt)
<http://data.example.com/employee/7369>
ex:department <http://data.example.com/department/10> ;
ex:department <http://data.example.com/department/20> .
<http://data.example.com/employee/7400>
ex:department <http://data.example.com/department/10>.
<#TriplesMap3>
rr:logicalTable [ rr:tableName "EMP2DEPT" ];
rr:subjectMap [
rr:template "http://data.example.com/employee/{EMPNO}";
];
rr:predicateObjectMap [
rr:predicate ex:department;
rr:objectMap [ rr:template "http://data.example.com/department/{DEPTNO}" ];
].
The mapping
23. +
Translating DB codes to IRIs
Assume the following correspondance:
CLERK
http://data.example.com/roles/general-office
NIGHTGUARD
http://data.example.com/roles/security
ENGINEER
http://data.example.com/roles/engineering
<http://data.example.com/employee/7369> ex:role
<http://data.example.com/roles/general-office>.
24. +
Translating DB codes to IRIs
<#TriplesMap1>
rr:logicalTable [ rr:sqlQuery """
SELECT EMP.*, (CASE JOB
WHEN 'CLERK' THEN 'general-office'
WHEN 'NIGHTGUARD' THEN 'security'
WHEN 'ENGINEER' THEN 'engineering'
END) ROLE FROM EMP
""" ];
rr:subjectMap [
rr:template "http://data.example.com/employee/{EMPNO}";
];
rr:predicateObjectMap [
rr:predicate ex:role;
rr:objectMap [ rr:template "http://data.example.com/roles/{ROLE}" ];
].
26. +
Data errors
A data error is a condition of the data in the input database
that would lead to the generation of an invalid RDF term.
The following conditions give rise to data errors:
A term map with term type rr:IRI results in the generation of an
invalid IRI.
A term map whose natural RDF datatype is overridden with a
specified datatype produces an ill-typed literal (see datatypeoverride RDF literal).
27. +
Data errors
A data error is a condition of the data in the input database
that would lead to the generation of an invalid RDF term.
The following conditions give rise to data errors:
A term map with term type rr:IRI results in the generation of an
invalid IRI.
A term map whose natural RDF datatype is overridden with athe
Data errors cannot generally be detected by analyzing
specified datatype produces an ill-typed literal (see datatype- data
table schema of the database, but only by scanning the
override RDF tables. For large and rapidly changing databases, this
in the literal).
can be impractical. Therefore, R2RML processors are
allowed to answer queries that do not “touch” a data error,
and the behavior of such operations is well-defined. For the
same reason, the conformance of R2RML mappings is
defined without regard for the presence of data errors.
28. +
Default Mappings
An R2RML processor may include an R2RML default
mapping generator.
The default mapping should be such that its output is the Direct
Graph corresponding to the input database (Direct Mapping).
Duplicate row preservation: For tables without a primary key,
the Direct Graph requires that a fresh blank node is created for
each row. This ensures that duplicate rows in such tables are
preserved. This requirement is relaxed for R2RML default
mappings: They may reuse the same blank node for multiple
duplicate rows. This behaviour does not preserve duplicate
rows.
29. +
Logical Tables
A logical table is a tabular SQL query result that is to be mapped to
RDF triples. A logical table is either
• a SQL base table or view, or
• an R2RML view.
Every logical table has an effective SQL query that, if executed
over the SQL connection, produces as its result the contents of the
logical table.
30. +
Base Tables and SQL Views
(rr:tableName)
A SQL base table or view is a logical table containing SQL data
from a base table or view in the input database. A SQL base
table or view is represented by a resource that has exactly one
rr:tableName property.
The value of rr:tableName specifies the table or view name of
the base table or view. Its value must be a valid schemaqualified name that names an existing base table or view in the
input database.
The effective SQL query of a SQL base table or view is:
SELECT * FROM {table}
31. +
Example of mapping to a base table
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix ex: <http://example.com/ns#>.
<#TriplesMap1>
rr:logicalTable [ rr:tableName "EMP" ];
rr:subjectMap [
rr:template "http://data.example.com/employee/{EMPNO}";
rr:class ex:Employee;
];
rr:predicateObjectMap [
rr:predicate ex:name;
rr:objectMap [ rr:column "ENAME" ];
].
32. +
R2RML Views (rr:sqlQuery, rr:sqlVersion)
An R2RML view is a logical table whose contents are the result
of executing a SQL query against the input database. It is
represented by a resource that has exactly one rr:sqlQuery
property, whose value is a literal with a lexical form that is a
valid SQL query.
Data transformation
R2RML mappings sometimes require data transformation,
computation, or filtering before generating triples from the
database. This can be achieved by defining a SQL view in the
input database and referring to it with rr:tableName. However,
this approach may sometimes not be practical for lack of
database privileges or other reasons. R2RML views achieve the
same effect without requiring changes to the input database.
33. +
R2RML Views (rr:sqlQuery)
Duplicated columns are not allowed:
SELECT EMP.DEPTNO, 1 AS DEPTNO FROM EMP;
Unnamed columns are not recommended
SELECT DEPTNO, COUNT(EMPNO) FROM EMP GROUP BY
DEPTNO;
34. +
Example of mappings to views
<#DeptTableView> rr:sqlQuery """
SELECT DEPTNO,
DNAME,
LOC,
(SELECT COUNT(*) FROM EMP WHERE EMP.DEPTNO=DEPT.DEPTNO) AS
STAFF
FROM DEPT;
<#TriplesMap2>
""".
rr:logicalTable <#DeptTableView>;
rr:subjectMap [
rr:template "http://data.example.com/department/{DEPTNO}";
rr:class ex:Department;
];
rr:predicateObjectMap [
rr:predicate ex:name;
rr:objectMap [ rr:column "DNAME" ];
];
rr:predicateObjectMap [
rr:predicate ex:staff;
rr:objectMap [ rr:column "STAFF" ];
].
35. +
R2RML Views (rr:sqlVersion)
An R2RML view may have one or more SQL version identifiers.
They must be valid IRIs and are represented as values of the
rr:sqlVersion property. The following SQL version identifier
indicates that the SQL query conforms to Core SQL 2008:
http://www.w3.org/ns/r2rml#SQL2008
The absence of a SQL version identifier indicates that no claim
to Core SQL 2008 conformance is made.
Additional identifiers, not normative, an be found at:
http://www.w3.org/2001/sw/wiki/RDB2RDF/SQL_Version_IRIs
38. +
Mapping Logical Tables to RDF with
Triples Maps
A triples map specifies a rule for translating each row of a logical
table to zero or more RDF triples.
39. +
Mapping Logical Tables to RDF with
Triples Maps
The RDF triples generated from one row in the logical table all share the
same subject.
A triples map is represented by a resource that references the following
other resources:
• It must have exactly one rr:logicalTable property. Its value is a logical
table that specifies a SQL query result to be mapped to triples.
• It must have exactly one subject map that specifies how to generate a
subject for each row of the logical table. It may be specified in two ways:
• using the rr:subjectMap property, whose value must be the subject
map, or
• using the constant shortcut property rr:subject.
• It may have zero or more rr:predicateObjectMap properties, whose
values must be predicate-object maps. They specify pairs of predicate
maps and object maps that, together with the subjects generated by
the subject map, may form one or more RDF triples for each row.
42. +
Creating Resources with Subject
Maps
A subject map is a term map. It specifies a rule for generating
the subjects of the RDF triples generated by a triples map.
Term maps are used to generate the subjects, predicates and
objects of the RDF triples that are generated by a triples map.
Consequently, there are several kinds of term maps, depending
on where in the mapping they occur: subject maps, predicate
maps, object maps and graph maps.
A term map must be exactly one of the following:
a constant-valued term map,
a column-valued term map,
a template-valued term map.
49. +
Creating Properties and Values with
Predicate-Object Maps
A predicate-object map is a function that creates one or more
predicate-object pairs for each logical table row of a logical
table. It is used in conjunction with a subject map to generate
RDF triples in a triples map.
50. +
Creating Properties and Values with
Predicate-Object Maps
A predicate-object map is represented by a resource that references the
following other resources:
One or more predicate maps. Each of them may be specified in one of two
ways:
using the rr:predicateMap property, whose value must be a predicate map, or
using the constant shortcut property rr:predicate.
One or more object maps or referencing object maps. Each of them may be
specified in one of two ways:
using the rr:objectMap property, whose value must be either an object map,
or a referencing object map.
using the constant shortcut property rr:object.
A predicate map is a term map.
An object map is a term map.
53. +
Creating Properties and Values with
Predicate-Object Maps
A referencing object map allows using the subjects of another triples map as the objects generated
by a predicate-object map. Since both triples maps may be based on different logical tables, this
may require a join between the logical tables. This is not restricted to 1:1 joins.
A referencing object map is represented by a resource that:
has exactly one rr:parentTriplesMap property, whose value must be a triples map, known as the
referencing object map's parent triples map.
may have one or more rr:joinCondition properties, whose values must be join conditions.
A join condition is represented by a resource that has exactly one value for each of the following
two properties:
rr:child, whose value is known as the join condition's child column and must be a column name
that exists in the logical table of the triples map that contains the referencing object map
rr:parent, whose value is known as the join condition's parent column and must be a column
name that exists in the logical table of the referencing object map's parent triples map.