Skip to Main Content
Learning SPARQL, 2nd Edition
book

Learning SPARQL, 2nd Edition

by Bob DuCharme
July 2013
Beginner content levelBeginner
386 pages
10h 33m
English
O'Reilly Media, Inc.
Book available
Content preview from Learning SPARQL, 2nd Edition

Chapter 5. Datatypes and Functions

In earlier chapters we’ve already seen some use of datatypes and functions in SPARQL queries. These are overlapping topics, because queries often use functions to get the most value out of datatypes. In this chapter, we’ll look at the big picture of what roles these topics play in SPARQL and the range of things they let you do:

Datatypes and Queries

RDF supports a defined set of types as well as customized types, and your SPARQL queries can work with both.

Functions

Functions let your queries find out about your input data, create new values from it, and gain greater control over typed data. In this section, we’ll look at the majority of the functions defined by the SPARQL specification.

Extension Functions

SPARQL implementations often add new functions to make your development easier. In this section, we’ll see how to take advantage of these and what kinds of things they offer.

Datatypes and Queries

Does “20022” represent a quantity, a Washington DC postal code, or an ISO standard for financial services messaging? If we know that it’s an integer, we know that it’s more likely to represent a quantity. On the other hand, if we know that it’s a string, it’s more likely to be an identifier such as a postal code, the identifier of an ISO standard, or a part number.

Decades before the semantic web, the storing of datatype metadata was one of the earliest ways to record semantic information. Knowing this extra bit of information about a piece of data gives you ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Algorithms

Learning Algorithms

George Heineman
Learning React, 2nd Edition

Learning React, 2nd Edition

Alex Banks, Eve Porcello
Learning Spark, 2nd Edition

Learning Spark, 2nd Edition

Jules S. Damji, Brooke Wenig, Tathagata Das, Denny Lee

Publisher Resources

ISBN: 9781449371449Errata Page