Query languages for the web
Download
Report
Transcript Query languages for the web
Query languages for the web
A way forward
By Eva Foster
1
16/07/2015
Query Languages for the web
Why
is a query language important?
What
can a query language do for the web?
How
can it be achieved ?
2
16/07/2015
Why?
The need to retrieve information.
We are producing more documents for the
web than ever.
The web is growing.
To get information from the web will become
even more difficult.
3
16/07/2015
What?
4
Better user interaction with the web.
Answer to more specific questions.
Improve information retrieval by reducing
hits.
16/07/2015
How?
Tim Berners-Lee and the W3C proposal include:
5
To structured the web by using the knowledge of
the relational database approach.
creating standards of how data should be
represented.
Query the web using SQL technology.
Give meaning to the web (The semantic web).
16/07/2015
RDBMS & SQL
SQL
Request
Database
Management
System
Data
6
16/07/2015
Database
The benefits of SQL
7
It was created to work with the relational
database approach.
It is an international standard mechanism for
data manipulation.
The web contains an enormous amount of
relational databases.
16/07/2015
SQL example
The Select Statement.
SELECT – FROM – WHERE
Select
*
(select all employees)
From
Employees
( table employees)
Where salary “50.000”
(salary = 50.000)
8
16/07/2015
Drawbacks
9
to retrieve data from a relational database
the data be rigidly structured:
schemas, constrains, rules, and standards.
SQL works by recognising the structure of
the database. Every component of the
database must be know for SQL to work.
The web is semi structured.
16/07/2015
The semantic web
10
The semantic web follows the principles of
relational database.
Most data on the web comes from this kind of
databases.
16/07/2015
W3C suggestions
To achieve a semantic web we need :
11
a flexible markup language (XML)
A framework (RDF)
An efficient query language
16/07/2015
XML
The reasons that XML is convenient:
12
It define a way to structure describe and
interchange data.
It is self describing.
XML can be used for any kind of data.
16/07/2015
A simple XML document
<product>
<name>Apple</name>
<price>0.10</price>
</product>
THE XML ELEMENT NAME (TAG NAMES) SERVE TO DESCRIBE
INFORMATION PROVIDED IN THE DOCUMENT.
13
16/07/2015
DTD Document Type Definition
14
DTD specification is a part of the original
XML 1.0
it is a schema that sets out the structure and
constraints
It allows a developer to specify what
elements and attributes may be used in a
particular type of XML document.
16/07/2015
RDF- Resource Description Framework
15
RDF integrates a variety of applications
using XML for syntax and URIs for naming.
It is a model of entities and relationships like
the ER entity relationship modelling system.
16/07/2015
RDF GRAPH
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/People/EM/contac#Person
http://www.w3.org/2000/10/swap/pim/contac#fullName
http://www.w3.org/People/EM/contac#me
Eric Miller
mailto:[email protected]
http://www.w3.org/2000/10/swap/pim/contac#mailbox
Dr.
http://www.w3.org/2000/10/swap/pim/contac#personalTitle
16/07/2015
16
RDF/XML
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#”
xmlns:contact=http://www.w3.org/2000/10/swap/pim/contact>
<contact:Person
rdf:about=http://www.w3.org/People/EM/contact#me>
<contact:fullName>Eric Miller</contact:fullName>
<contact:mailbox rdf:resource=mailto:[email protected]>
<contact:personalTitle>Dr.</contact:personalTitle>
</contact:Person>
</rdf:RDF>
17
16/07/2015
Structure Query Language for the Web
Squeal
provides users with the illusion that the Web is
stored and organized in a relational database.
consists of two parts:
18
a schema describing the Web and
an implementation that answers queries about the
schema.
16/07/2015
Squeal
Squeal explore the semi structure of the
web:
the text structure.
lists, and formatting (hyperlinks)
uniform resource locator (URL)
host name followed
keywords and values.
19
16/07/2015
Example
What pages contain "hypertext" and have
fewer than 1000 bytes?
SELECT url
FROM page
WHERE contents LIKE '%hypertext%'
AND bytes < 1000;
20
16/07/2015
A query language for XML
XQuery designed to query non-XML query syntax.
XQuery derives from an XML query language called
Quilt.
Other query languages includes :
–
–
–
–
–
21
XML-QL,
XQL,
XPath 1.0
OQL.
SQL.
16/07/2015
XML Query
XML
Request
XML
Document
22
The
Semantic
Data
Model
16/07/2015
The Web
Conclusion
23
The w3C is working to develop new
technology to make querying the web easier.
The semantic web idea is a important ways
in which database and Information Retrieval
technologies could interact.
A query language for the web can improve
information retrieval.
16/07/2015