Database Reference
In-Depth Information
$triplify['queries'] = array(
'/^near\/(-?[0-9\.]+),(-?[0-9\.]+)\/([0-9]+)\/?$/' =>'
SELECT CONCAT(“base:”,n.type,”/”,n.id,”#id”)
AS id, CONCAT(“vocabulary:”,n.type)
AS “rdf:type”, '.$latlon.',
rv.label AS “t:unc”, REPLACE(rk.label,”:”,”%25”), '.$distance.'
FROM elements n
INNER JOIN tags t USING(type,id)
INNER JOIN resources rk ON(rk.id = t.k)
INNER JOIN resources rv ON(rv.id = t.v)
WHERE '.$box.'
HAVING distance < $3 LIMIT 1000',
);
To find places near (within a certain radius) to a certain latitude/longitude point,
one can type http://linkedgeodata.org/triplify/near/ latitude , longitude / radius into
any Linked Data-enabled browser. However, one still needs to know (by reading the
documentation) how to structure the URL (Uniform Resource Locator) to access the
Web service and understand (by understanding the SQL query and regular expres-
sions, as discussed) how the results have been calculated. It is not yet a transparent,
explicit, RDF-based approach.
7.5.3.3 R2O
R2O is another language for expressing mappings between RDBs and an RDFS
ontology, this one based on XML. It works alongside ODEMapster, a processor that
uses the R2O document to create an RDF dump of the whole database or, when in
query-driven mode, translates queries expressed in the ODEMQL query language
(which is specifically designed for ODEMapster) on the fly to SQL. It has been used
extensively by the GeoLinkedData project 18 (not to be confused with the Linked
GeoData RDF version of GeoNames), which is tasked with adding Spanish geo-
spatial data to the Linked Data Web. As well as requiring queries to be written in
a proprietary language, rather than SPARQL, ODEMapster cannot in itself serve
Linked Data. Instead, the GeoLinkedData project has to load the generated static
RDF into Virtuoso's triple store to publish on the Web. Hence, it is less suitable for
Merea Maps' direct use.
7.5.3.4 D2R Server
Another tool that Merea Maps could use to expose a Linked Data view of its RDB is
D2R Server. D2R Server offers a Linked Data interface (also known as a “dereferencing
interface”) that makes RDF descriptions of resources available via HTTP. Using a
Linked Data-enabled browser such as Tabulator or Disco (see Section 7.10), the RDF
description can be retrieved over the Web just by entering the URI into the browser's
address box. D2R Server also offers a normal HTML Web interface and a SPARQL
endpoint. HTTP requests are rewritten into SQL queries, using the mapping, so as
with Virtuoso, the RDF data can be explored on the fly, without the need to replicate
the data in a dedicated RDF triple store. D2R Server uses its own proprietary mapping
language called D2RQ, which describes the relationships between the RDFS ontology
Search WWH ::




Custom Search