The Simple Protocol and RDF Query Language (SPARQL) defines a standard query language and data access protocol for use with the Resource Description Framework (RDF) data model. SPARQL works for any data source that can be mapped to RDF. Although a number of RDF query languages are available, Connected Services Framework (CSF) Profile Manager only supports SPARQL queries.
An RDF graph is a set of one or more RDF triples; each triple consists of a subject, a predicate and an object. You add an RDF graph to the Profile Manager store by invoking the CreateProfile action. The following table represents a virtual RDF graph.
| Subject | Predicate | Object |
| urn:upc_abc | http://schemas.microsoft.com/connectedservices/pm#Phone | genid:ARP11 |
| genid:ARP11 | http://schemas.microsoft.com/connectedservices/pm#Phone-Home-Primary | "425-555-0111" |
| genid:ARP11 | http://schemas.microsoft.com/connectedservices/pm#Phone-Mobile-Other | "425-555-0114" |
| genid:ARP11 | http://schemas.microsoft.com/connectedservices/pm#Phone-Office-Other | "425-555-0115" |
This RDF graph begins with a subject that is associated with a blank node through a http://schemas.microsoft.com/connectedservices/pm#Phone predicate. The blank node is then associated with three separate objects through http://schemas.microsoft.com/connectedservices/pm#Phone-Home-Primary, http://schemas.microsoft.com/connectedservices/pm#Phone-Mobile-Other, and http://schemas.microsoft.com/connectedservices/pm#Phone-Office-Other predicates.
SPARQL enables you to gather information from such RDF graphs in the following ways:
- To extract information in the form of URIs, blank nodes, plain literals, and typed literals.
- To extract RDF subgraphs.
- To construct new RDF graphs based on information in queried graphs.
The current specification of SPARQL only defines read-only queries, so you can use it only for read and comparison operations for graphs that are stored in the Profile Manager database. For more information, see the SPARQL specification on the W3 Web site at http://www.w3.org/TR/rdf-sparql-query/.
The Profile Manager SPARQL parser supports a limited number of queries that are defined by the SPARQL specification. For more information, see SPARQL Queries Supported By the Profile Manager.
See Also