Database Reference
In-Depth Information
1. prefix admin: < http://data.mereamaps.gov.me/administrativeRegions/ >
2. ask
3. {
4. ?medina admin:hasPlaceName 'Medina';
5. admin:isContainedIn ?region.
6. ?region a admin:administrativeRegion;
7. admin:hasPlaceName 'North Merea'.
8. }
Note that this particular query does not tell us whether Medina also happens to be
in other administrative regions, and we are assuming that the place name provides a
sufficiently unique identifier. The ASK keyword is particularly useful for deciding if
the two datasets have any information in common.
The CONSTRUCT keyword returns a new RDF graph, so if we wanted to create a
graph of those cities (that are administrative units) in Merea Maps' dataset, using Merean
Mail's vocabulary (e.g., using the term “hasPostCity” rather than “hasPlaceName”),
we could make the following query:
1. prefix admin: < http://data.mereamaps.gov.me/administrativeRegions/ >
2. prefix postcodes: < http://data.mm.gov.me/postcodes . >
3. construct {?city postcodes:hasPostCity ?name}
4. where
5. {
6. ?city a admin:City;
7. admin:hasPlaceName ?name.
8. }
This is effectively a way of converting data from one schema to another.
Finally, the DESCRIBE keyword instructs the query to return any information about
a data resource that the data publisher would like to return. Often, this is specified in
the concise bounded description included in the Semantic Sitemap or Vocabulary of
Interlinked Datasets (VoID) metadata (see Section 7.6); however, it could be the named
graph or minimum self-contained graph. Since there is no standard definition of what
will be returned, describe queries are not interoperable. For example, the following
query will return the “description” (that is, all the information the publisher thinks you
need to know) about the administrative region of North Merea:
1. prefix admin: < http://data.mereamaps.gov.me/administrativeRegions/ >
2. describe ?northmerea
3. where
4. {
5. ?northmerea a admin:administrativeRegion;
6.
admin:hasPlaceName 'North Merea'.
7. }
8.3.4 g eo SparQl
We touched on the query language GeoSPARQL in Section 6.4 and its representation
of geometry, and in Section 6.6 also discussed the Region Connection Calculus 8
Search WWH ::




Custom Search