SPARQL Query Language for RDF 1 基本内容

RDF(Resource Description Framework)

  1. RDF is a directed, labeled graph data format for representing information in the Web
  2. Concepts
  • Graph data model
  • URI-based vocabulary
  • Datatypes
  • Literals
  • XML serialization syntax
  • Expression of simple facts
  • Entailment

Graph data model

  1. The basic structure of RDF is a collection of triples. Each triple has :
  • subject
  • predicate
  • object
  1. A set of such triples is called an RDF graph
  • The direction of the triples: use the subject to (use property) predictObject
  • It is a node-to-node relationship
  • Nodes in the graph: subjects and objects
    请添加图片描述
  1. An RDF triple is written in the order subject, predicate, object
  • Subject: RDF URI reference or a blank node
  • Predicate/Property: RDF URI reference : the property of the triple, it denotes a certain relatioship说白了就是Subject和Object沟通的桥梁,相当于外键-主键
  • Object: RDF URI reference, a literal or a blank node

URI-based Vocabulary and Node Identification

  1. URI reference or lieral used as node identifiers. It represents what a node represents or what the relationship is
  • The predicate can also be a node in the graph
  1. A node may be one of:
  • a URI with optinal fragment identifier
  • literal
  • blank
  1. Properties are URI references

Datatypes

Namespaces

PrefixIRI
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs:http://www.w3.org/2000/01/rdf-schema#
xsd:http://www.w3.org/2001/XMLSchema#
fn:http://www.w3.org/2005/xpath-functions#

Data Descriptions

SPARQL query language uses the Turtle data fromat to show each triple
Turtle allows IRIs to be abbreviated with prefixes

Turtle: Terse RDF Triple languagle

https://www.w3.org/TeamSubmission/turtle/

Result Descriptions

xyz
“Alice”http://example/a
  1. Binding is a pair(variable, RDF term)
  2. In this results, there are three variables: x y z
  3. variable x is bound to Alice, variable y is bound to "http://example/a
  4. variable z is not bound to an RDF term
  5. variable are not neccessarly to be bound
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值