QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

Can I use SPARQL to insert, update, or delete RDF data?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
The current, standardized version of SPARQL deals only with retrieving selected data from RDF graphs. There is no equivalent of the SQL INSERT, UPDATE, or DELETE statements. Most RDF-based applications handle new, changing, and stale data directly via the APIs provided by specific RDF storage systems. Alternatively, RDF data can exist virtually (i.e. created on-demand in response to a SPARQL query).

Can I use SPARQL to query data that's not stored in RDF?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
Several software packages exist which allow SPARQL queries to generate answers from data sources other than RDF, such as relational databases, LDAP servers, or XML data. The community maintains a list of these tools at the W3C ESW Wiki.

Can I receive the results of SPARQL queries as RDF?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
The SPARQL protocol requires that the results of SPARQL CONSTRUCT and DESCRIBE queries be RDF graphs. SELECT and ASK queries, on the other hand, usually have their results returned as XML (or sometimes as JSON). However, as part of the group's test suite, the DAWG includes an RDF vocabulary which can be used to represent the results of SELECT or ASK queries in RDF.

How can I query transitive closures / trees / hierarchies / RDF lists in SPARQL?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
There is no built-in support within SPARQL to query hierarchical structures of an unknown depth (e.g. trees or lists), to query transitive relations, or to query via XPath like paths. The Data Access Working Group postponed this issue in early 2005. Repeated queries. A repeating structure can be queried via a series of queries.

What is SPARQL?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
SPARQL is a recursive acronym standing for SPARQL Protocol and RDF Query Language. As the name implies, SPARQL is a general term for both a protocol and a query language. Most uses of the SPARQL acronym refer to the RDF query language. In this usage, SPARQL is a syntactically-SQL-like language for querying RDF graphs via pattern matching. The language's features include basic conjunctive patterns, value filters, optional patterns, and pattern disjunction.

Can I use SPARQL to query RDFS entailments?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
It is sometimes desirable to use SPARQL to query triples entailed from subclass, subproperty, range, domain, and other relations which can be represented using RDF Schema. The SPARQL specification defines the results of queries based on RDF simple entailment. However, the specification does present a general, parametrized definition of graph pattern matching that can be expanded to other entailments beyond RDF simple entailment.

Can I use SPARQL to query OWL entailments?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
For the most part, the answer to this question is the same as the above answer regarding RDFS entailment. However, OWL-DL axioms do not always result in a unique deductive closure, and as such querying OWL-DL entailments requires instantiating the parametrized SPARQL basic graph pattern definition with values appropriate for OWL-DL entailment. The open-source OWL-DL reasoner, Pellet, will answer SPARQL queries while considering OWL-DL entailments.

How often do you update your data?

Texas Cancer Information - Frequently Asked Questions
Individual entities in the databases are surveyed on an annual basis. Databases are surveyed on a schedule throughout the year. Survey results from all the databases are being entered on an ongoing basis. New data is moved on-line weekly. As new information regarding a facility or individual is obtained between scheduled surveys, this information is updated and the information date specified with that entry's listing is updated accordingly.

Can I use SPARQL to search for substring matches within literal values?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
SPARQL provides the function, regex(), which can be used to test whether a literal value contains a certain substring: SELECT ?title WHERE { _:book :title ?title . FILTER (regex(?title, "SPARQL")) . } The regex() function expects its first argument to be either a plain literal without a language tag or else a typed literal with a datatype of xsd:string. Plain literals with a language tag or typed literals of other datatypes will evaluate to a type error which causes the filter to fail.

How do I Insert/Update large amounts of data?

Minisoft ODBC/32 - Support FAQ
By default the driver is set to Item Level Locking. Trying to do a mass Insert/Update of a Detail dataset will usually cause an error because the Image Lock Descriptor Buffer is filled up. This is an Image limitation. To get around this problem you need to use Set Level Locking. Uncheck the "Enable item-level locking" box then save your DSN. This will force Set Level Locking. If you are trying to Insert more than 1,500 or so records you may get an error.

How can I learn SPARQL?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
There are a variety of SPARQL tutorials and introductions scattered around the Web. Some notable ones include:

How do I do a DDL (insert, update, delete) statement?

SQLite3/Ruby FAQ
You can actually do inserts, updates, and deletes in exactly the same way as selects, but in general the Database#execute method will be most convenient: db.execute( "insert into table values ( ?, ? )", *bind_vars )

How can I use SPARQL to query maximum/minimum values or other universally quantified criteria?

SPARQL Protocol and Query Language: SPARQL Frequently Asked ...
A combination of the SPARQL OPTIONAL keyword and the bound(...) filter function can be used to mimic some universally quantified queries. As an example, consider this query which finds the minimum price of every book in the underlying default graph: PREFIX ex: <http://example.org/> SELECT ?book ?minprice WHERE { ?book a ex:book ; ex:price ?minprice . OPTIONAL { ?book ex:price ?otherprice . FILTER( ?otherprice < ?minprice ) . } . FILTER ( !bound(?otherprice) ) .

Why is my RDF data not getting updated?

Longwell FAQ - SIMILE
When Longwell is started without arguments, it reads the default repository. When you load data using ./longwell -r /path/to/data it is aggregated with that default repository rather than updated. If you wish to update your RDF data, you must load it into a new repository using the -d switch: ./longwell -r /path/to/data -d /tmp/blah1.

How can I insert or delete a line (or record) in the middle of a file?

Infrequently Asked Questions in comp.lang.c
Using fcntl(), lock the line or record in the file exclusively. Now, using another thread, read the file, at each byte, trying to write that byte back. Whenever you succeed, write that byte into another file. Then copy the new file over the old file, releasing the lock first.

I can access my tables with OOo, but I can't update or insert any data - why?

FAQ (Base) - OpenOffice.org Wiki
OOo requires a table (or, more specifically, the data in a row set) to contain a primary key or a a unique index in order to allow data manipulation. Alternatively, it suffices if the driver supports bookmarks (like some ODBC drivers or the internal dBase implementation do). The reason for this is that this is the only secure way to ensure that the changes you do affect the proper record (in case of updates), resp. that you, later on, can work with your newly inserted record.

How can I query RDF data?

W3C Semantic Web FAQ
The W3C Data Access Working Group has developed the SPARQL Query Language. SPARQL defines queries in terms of graph patterns that are matched against the directed graph representing the RDF data. SPARQL contains capabilities for querying required and optional graph patterns along with their conjunctions and disjunctions. The result of the match can also be used to construct new RDF graphs using separate graph patterns.

Why not use SQL and/or XQuery to query RDF data? Why develop yet another query language?

W3C Semantic Web FAQ
SPARQL is a query language developed for the RDF data model; queries themselves look and act like RDF. I.e., the queries are independent of the physical representation of the RDF data (the structure of the databases, their representation in an RDF/XML file, etc). If query was done via, for example, XQuery, the application would have to know how that particular RDF data exactly represented as RDF/XML (and RDF/XML is only one of the possible serialization of the RDF data).
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact