YOUR AD GOES HERE

Learn SPARQL 022 - 03.01.02 Getting Labels from Schemas and Ontologies

Published 22, Apr 2026

Yasen - Enterprise Architecture


Description:
In this tutorial, we continue our Learn SPARQL series by exploring how to make query results more human-readable by fetching labels directly from schemas and ontologies. Specifically, we demonstrate how to use the FOAF (Friend of a Friend) ontology and RDFS (RDF Schema) to transform cryptic URIs into clear, meaningful labels.

Building on our previous lessons, we walk through the process of creating local Turtle (.ttl) and SPARQL query (.rq) files, downloading external ontology files, and combining them to extract rich metadata like property labels and descriptions.

What you’ll learn in this video:

- External Ontologies: How to download and integrate the FOAF index RDF file into your local SPARQL environment.
- Improving Readability: Using rdfs:label and rdfs:comment to replace technical property names with user-friendly text.
- Advanced Query Logic: How to treat the predicate of one triple as the subject of another to fetch its metadata.
- Multi-Data Source Querying: Running SPARQL queries across multiple data files (your local TTL data and the external FOAF ontology).
- Ontology Visualization: A quick look at how the FOAF ontology structure appears in tools like Protégé.

Key Timestamps:

- 00:00 – Introduction: Making query results more readable
- 01:25 – Understanding RDFS (RDF Schema) and Ontologies
- 03:00 – Creating the local Turtle (.ttl) data file
- 06:10 – Writing the SPARQL query (.rq) to fetch labels
- 10:50 – How to find and download the FOAF specification RDF file
- 13:40 – Running the query against multiple data sources
- 18:50 – Analyzing the results: Combining local data with ontology metadata
- 25:50 – Adding property descriptions (rdfs:comment) to your query
- 30:00 – Viewing the FOAF ontology in Protégé
- 32:00 – Summary and what's coming next (Optional data/OPTIONAL clause)

Resources Mentioned:

- FOAF Project: http://xmlns.com/foaf/0.1/
- Protégé Ontology Editor: https://protege.stanford.edu/
- W3C RDFS Specification: https://www.w3.org/TR/rdf-schema/

About this Series: Master SPARQL and the Semantic Web! This series follows the "Learning SPARQL" curriculum, providing hands-on labs for Enterprise Architects and Data Scientists to master graph data querying.

Connect with the Channel: If you found this technical deep-dive helpful, please Like the video and Subscribe to Xiaoqi (Yasen) Zhao - Enterprise Architecture. If you run into issues with your prefixes or namespaces, leave a comment below!

#SPARQL #RDF #SemanticWeb #Ontology #FOAF #RDFS #GraphDatabase #LinkedData #EnterpriseArchitecture #DataModeling #Protege

Releted More Videos

You May Also Like

YOUR AD GOES HERE

YOUR AD GOES HERE