Free degree-level computing lessons for careful independent study.

Degree Level Programmes · Search, data management and analytics · Lesson 15

Semantic Web and Linked Data

Introduce Semantic Web and linked data principles, including URI identifiers, RDF triples, SPARQL-style querying and the relationship between semantics and query expansion.

Lesson overview

Introduce Semantic Web and linked data principles, including URI identifiers, RDF triples, SPARQL-style querying and the relationship between semantics and query expansion.

CourseInformation Storage and Retrieval
Topic strandSemantics and linked data
Assessment styleWorked scenario, applied task and digital exam practice
EvidenceDefinitions, representation, method, result and interpretation

Starter

Write down the user need, the data being stored or searched, and the decision the system has to support. Then predict which representation, index, query method or governance control will matter most in this lesson.

Learning objectives

  • Explain linked data using URI identifiers and RDF triples.
  • Describe how SPARQL queries graph-shaped data.
  • Connect Semantic Web vocabularies to query expansion and richer retrieval.

Learning outcomes

  • Students can explain linked data using URI identifiers and RDF triples.
  • Students can describe how SPARQL queries graph-shaped data.
  • Students can connect Semantic Web vocabularies to query expansion and richer retrieval.

Key vocabulary, acronyms and terminology

Semantic Web
A vision of web data with machine-readable meaning and links.
linked data
Data published with stable identifiers and links to related data.
RDF
Resource Description Framework: a way of representing facts as triples.
URI
Uniform Resource Identifier: a global identifier for a resource or concept.
triple
A subject-predicate-object statement.
SPARQL
SPARQL Protocol and RDF Query Language: a query language for RDF graphs.

Detailed teaching notes

Core concept

The Semantic Web shifts retrieval from matching text strings to following typed relationships between identified resources. Linked data makes entities, concepts and relationships explicit.

Representation choice

An RDF triple such as <book123> <hasAuthor> <adaLovelace> links a resource to an identified author. Many triples form a graph that can be queried and traversed.

Method and reasoning

Use URIs for entities, publish triples using shared vocabularies and query the graph with SPARQL-like patterns. For retrieval, use semantic relationships to expand, disambiguate or filter queries.

Risk and limitation

Linked data is only useful when identifiers, vocabularies and links are managed carefully. Broken URIs or vague predicates create a graph that looks formal but says little.

Degree-level deep dive

Identifiers beat ambiguous names

Linked data uses URIs so systems can refer to the same entity even when names vary. This is crucial when people, places and concepts have aliases, translations or similar labels, because retrieval can follow the identifier rather than guessing from surface text.

Triples make relationships queryable

RDF triples turn meaning into graph statements. A SPARQL query can follow relationships such as creator, subject, place and period rather than relying only on literal word matches.

What excellent work shows

A strong answer writes at least one subject-predicate-object triple, explains why the URI matters, and shows how a graph query supports retrieval or expansion that keyword search would miss.

Concrete example to study

RDF triples

(work:123, dc:creator, person:ada-lovelace)
(work:123, dc:subject, topic:computing)
(person:ada-lovelace, schema:alternateName, 'A. A. Lovelace')

Reasoning

  1. The URI person:ada-lovelace keeps the entity stable across name variants.
  2. The subject-predicate-object shape makes relationships queryable.
  3. A SPARQL query can retrieve works by the person URI even when the displayed name varies.
Reveal takeaway

Linked data improves retrieval when identity and relationships matter more than exact wording, because the graph can follow typed links rather than relying on matching strings.

Worked example

Scenario

A museum wants 'paintings by women artists' to retrieve works even when pages do not contain that exact phrase.

Worked solution

  1. Identify works, artists and gender-related authority records with URIs.
  2. Represent facts as triples: work hasCreator artist; artist hasGender woman.
  3. Query the graph for works whose creator has the target property.
  4. Use the graph result to support retrieval or query expansion.
Reveal model result

Semantic retrieval depends on explicit relationships. It can find conceptually relevant items that literal keyword search may miss.

Applied retrieval task

Model a small linked-data graph for publications.

Deliverables

  1. Create five RDF-style triples for papers, authors and topics.
  2. Write a SPARQL-style pattern to find papers by topic.
  3. Explain how a URI prevents ambiguity between two people with the same name.

Success checks

  • Triples use clear subject, predicate and object roles.
  • The query follows relationships rather than matching only text.

Common misconception

The Semantic Web is not just adding keywords. It adds typed relationships between identified resources.

Quick checks

1. In this lesson, why does Semantic Web matter?

2. Which answer best shows degree-level understanding of semantic web and linked data?

Digital exam practice

Example exam task

A cultural archive wants a query for 'Ada Lovelace computing manuscripts' to find records linked to Ada even when the visible page uses variant names. In your answer, define the relevant objects or data structures, use course-specific vocabulary, show the method rather than only the result, and finish with a decision about the storage or retrieval system.

Notation and technical toolkit

(s,p,o)RDF triple shape Use to write subject, predicate and object facts.
URIglobal identifier Use to avoid ambiguous names.
SELECT ?x WHERE {...}SPARQL-style query Use to retrieve graph patterns.

What a good answer is expected to show

A strong answer for Semantic Web and Linked Data the answer should use URI identifiers, RDF triples, SPARQL-style graph patterns and explain how linked data supports semantic query expansion. It should connect the formal or technical representation to the user's information need instead of listing terms without using them.

How to solve it

  1. Identify entities that need stable URIs.
  2. Write RDF triples linking manuscripts, creators and topics.
  3. Describe a SPARQL-style query over those triples.
  4. Explain how semantic links improve retrieval beyond keyword matching.

Model answer

Reveal model answer

The archive should identify Ada Lovelace, manuscript records and topics with URIs rather than relying on name strings. RDF triples can state manuscript123 hasCreator adaLovelace and manuscript123 hasTopic computing. A SPARQL-style query can retrieve manuscripts where the creator URI is Ada's authority record, regardless of displayed name variant. This linked data can also expand user queries to related names or topics while keeping the entity identity precise.

Practise next

  1. Write three triples for a book, author and subject.
  2. Explain why a URI is stronger than a plain text name in linked data.

Self-marking criteria

  • Defines the scenario objects, data forms or system components before solving.
  • Uses the lesson vocabulary accurately and in context.
  • Shows a clear method with enough working for a marker to follow.
  • Connects the result back to retrieval, storage, analytics or governance.
  • States a limitation, trade-off or quality risk rather than presenting the answer as absolute.

Extension

Look up a public linked-data record and identify its subject, predicate and object structure.

Study route

Save a short worked answer from this lesson using this pattern: define the need or data, choose the representation, show the method, state the result and interpret the implication for the system.

Next lesson: Faceted Classification and Browsing.