XML Query Languages: XQL and XML-QL Comparison, Slides of Information Security and Markup Languages

An overview of xml query languages, focusing on xql and xml-ql. It covers their goals, usage scenarios, general requirements, xml query functionality, xml query data model, node accessors, value constructors, and examples. These query languages enable users to access, manipulate, and extract data from xml documents.

Typology: Slides

2011/2012

Uploaded on 07/17/2012

panita
panita šŸ‡®šŸ‡³

4.8

(6)

43 documents

1 / 47

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
The Problem (DBMS Vs Docs)
3-level hierarchy: table, record and field
Order is not part of the information
Strings in separate fields are separate
Location of data is not generally
significant
Linking is far more often part of the data,
not part of the schema representing data
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f

Partial preview of the text

Download XML Query Languages: XQL and XML-QL Comparison and more Slides Information Security and Markup Languages in PDF only on Docsity!

The Problem (DBMS Vs Docs) 

3-level hierarchy: table, record and field

Order is not part of the information

Strings in separate fields are separate

Location of data is not generally significant

Linking is far more often part of the data, not part of the schema representing data

Goals 

Data Model



Based on XML Infoset

Query Operators

Query Language

General Requirements 

Syntax Binding



MAY have more than one syntax binding

Declarativity



MUST be declarative

Protocol Independence



MUST be defined independently of any

protocols

Error Conditions

XML Query Functionality (1)

Quantifiers



MUST include support for both Universal and

Existential Quantifiers

Hierarchy and Sequence



MUST support operations on hierarchy and

sequence of document structures

Aggregation



MUST allow computing summary information

XML Query Functionality (3) 

Structural Transformation



MUST be able to transform and create new

structures

References



MUST be able to traverse intra- and inter-

document references

Text and Element Boundaries



MUST handle text across element boundaries

XML Query Functionality (4) 

Operation on Schemas



MUST be able to access Schemas or DTDs

Extensibility



SHOULD support the use of externally

defined functions

Operation on Names



MUST perform simple operations on names



MAY perform more powerful operations

XML Query Data Model (1) 

Datatypes



MUST represent XML 1.0 data as well as

simple and complex types of XML Schema

References



MUST include support for references, both,

internal and external

Schema Availability



MUST query even in the absence of Schema

XML Query Data Model (2) 

Trees



Node-labeled



Edge-labeled

XML Query data model is a Node-labeled, tree-constructor representation

Node functions



Constructors



Accessors

Value Constructors 

Fourteen primitive XML Schema datatypes 

stringValue



boolValue



floatValue



doubleValue



decimalValue



timeDurValue



recurDurValue



binaryValue



urirefValue



idValue



idrefValue



qnameValue



entityValue



notationValue

Note: ValueNode replaces XPath’s TextNode

Example

xsi:schemaLocation = ā€œhttp://www.mywebsite.com/PartSchema

http://www.mywebsite.com/PartSchemaā€

name=ā€œnutboltā€>

Acme10.50

</p:part>

Data-Model (2)

parent(A1)

= Ref(E1)

prefix(N1)

= Ref(StringValue("p", Ref(Def_string)))

uri(N1)

= URIRefValue("http://www.mywebsite.com/PartSchema",

Ref(Def_uriReference))

parent(N1)

= Ref(E1)

Constraints on Data Model

Node References



Defined by the query system NOT by the

query language

Node Identity



The function ref is one-to-one onto



ref_equal(ref(n1), ref(n2))

ļƒ›

equal(n1,n2)

Unique parent

Duplicate-free list of children

XQL Design (1)

Compact, easy to type and read

Simple for common cases

Embeddable in programs, scripts, URLs

Unique identification of each node

Declarative NOT procedural

Evaluation at any level in the document

Result in document order; no repeat node

XQL Design (2)

Superset of XSL

Closure is guaranteed ONLY if the implementation returns well-formed XMLdocuments