xquery novelties (xml holland 2010 - hardcore xml)

26
Geert Josten Hardcore XML track XML Holland XQuery Novelties 11 november 2010

Post on 13-Sep-2014

1.217 views

Category:

Technology


0 download

DESCRIPTION

Today, I will tell about the current status and latest novelties of XQuery. We will start with briefly touching it’s history to review its original scope, followed by a description of various of XQueries extensions. Some of the latest proposals will come by. We will also explore the territories beyond its original scope.

TRANSCRIPT

Page 1: XQuery Novelties (XML Holland 2010 - hardcore xml)

Geert Josten

Hardcore XML trackXML Holland

XQuery Novelties

11 november 2010

Page 2: XQuery Novelties (XML Holland 2010 - hardcore xml)

2

Agenda

Original Scope Extending Scope Newest Extensions Beyond Scope Summary

11 november 2010 Hardcore XML - XQuery

Page 3: XQuery Novelties (XML Holland 2010 - hardcore xml)

3

about XQuery

“XQuery is replacing proprietary middleware languages and Web Application development languages.”

11 november 2010 Hardcore XML - XQuery

Page 4: XQuery Novelties (XML Holland 2010 - hardcore xml)

4

About XQuery

“XQuery is replacing proprietary middlewarelanguages and Web Applicationdevelopment languages.”

Observation, glue More and more XQuery applications Beyond original scope

11 november 2010 Hardcore XML - XQuery

Page 5: XQuery Novelties (XML Holland 2010 - hardcore xml)

5

Original scope

11 november 2010 Hardcore XML - XQuery

Page 6: XQuery Novelties (XML Holland 2010 - hardcore xml)

6

Origin

1999, XPath and XSLT not enough Query languages applied to XML

SQL, OQL, Lorel, .. XML-QL, XQL Merged into Quilt XQuery WD in 2001

11 november 2010 Hardcore XML - XQuery

XQuery

XQueryXQueryX

Query

Page 7: XQuery Novelties (XML Holland 2010 - hardcore xml)

7

Origin

11 november 2010 Hardcore XML - XQuery

Page 8: XQuery Novelties (XML Holland 2010 - hardcore xml)

8

Extending scope

11 november 2010 Hardcore XML - XQuery

Page 9: XQuery Novelties (XML Holland 2010 - hardcore xml)

9

Database features

Efficient storage and extraction XQuery 1.0 Searching Transactional updating Data integrity, Triggers Simultaneous access Security, Crash-recovery Optionally: Versioning ...

11 november 2010 Hardcore XML - XQuery

Page 10: XQuery Novelties (XML Holland 2010 - hardcore xml)

10

XQuery and XPath Full Text 1.0

First extension, 2004 W3C Candidate Recommendation

Search within specific nodes Advanced ‘contains’ expressions Options

stemming, wildcards, thesaurus, ... Relevance ranking

Lot of implementations, few compliant

11 november 2010 Hardcore XML - XQuery

Page 11: XQuery Novelties (XML Holland 2010 - hardcore xml)

11

XQuery Update Facility 1.0

Introduced in 2006 W3C Candidate Recommendation

Updating of individual nodes: insert, delete, replace, rename, and transform

No return values! Various implementations, partly compliant

11 november 2010 Hardcore XML - XQuery

Page 12: XQuery Novelties (XML Holland 2010 - hardcore xml)

12

Newest extensions

11 november 2010 Hardcore XML - XQuery

Page 13: XQuery Novelties (XML Holland 2010 - hardcore xml)

13

XQuery Data Definition Facility

Presented at XML Prague 2010 28msec and ETH Zürich

Static declaration: collections, indexes and constraints

Functions: Updating collections Probing indexes

One implementation? Zorba / Sausalito

11 november 2010 Hardcore XML - XQuery

Page 14: XQuery Novelties (XML Holland 2010 - hardcore xml)

14

Update (PUL) compositions

Presented at XML Prague 2010 ETH Zürich and Oracle

Storage cheap Keep all changes

Consolidated changes aka composition Versions integral part of tree No implementations?

11 november 2010 Hardcore XML - XQuery

Page 15: XQuery Novelties (XML Holland 2010 - hardcore xml)

15

Beyond scope

11 november 2010 Hardcore XML - XQuery

Page 16: XQuery Novelties (XML Holland 2010 - hardcore xml)

16

XQuery Scripting Extension 1.0 (SX)

W3C Working Draft since 2008 Procedural constructs

While, variable assignment, exit, .. Breaks functional approach

Also allows multiple, incremental updates Update *and* return results Very useful for application logic

Few implementations yet

11 november 2010 Hardcore XML - XQuery

Page 17: XQuery Novelties (XML Holland 2010 - hardcore xml)

17

XQuery 1.1

W3C Working Draft since 2008 Lots of ‘small’ improvements

Improved FLWOR Try/Catch Output declarations

Dynamic function invocation Mature language, design patterns

Not many implementations yet

11 november 2010 Hardcore XML - XQuery

Page 18: XQuery Novelties (XML Holland 2010 - hardcore xml)

18

XRX and NoSQL

NoSQL: Use non-relational database Open source or open standard (like XQuery)

XRX: Xforms + Rest + Xquery Innovative two-tier architecture XForms front-end, XQuery back-end,

REST api Breaking long-lasting traditions

11 november 2010 Hardcore XML - XQuery

Page 19: XQuery Novelties (XML Holland 2010 - hardcore xml)

19

Summary

11 november 2010 Hardcore XML - XQuery

Page 20: XQuery Novelties (XML Holland 2010 - hardcore xml)

20

Database features revisited

Features covered: Extraction, Searching, Updating, Data constraints,

Versioning Functional in nature

Uncovered: Storage, Security, Triggers, Crash-recovery.. Mostly technical, necessary? More lacking?

11 november 2010 Hardcore XML - XQuery

Page 21: XQuery Novelties (XML Holland 2010 - hardcore xml)

21

Just remember

XQuery is not just for querying XML!

11 november 2010 Hardcore XML - XQuery

Page 22: XQuery Novelties (XML Holland 2010 - hardcore xml)

22

Questions?

11 november 2010 Hardcore XML - XQuery

Page 23: XQuery Novelties (XML Holland 2010 - hardcore xml)

23

Further reading

W3C: http://www.w3.org/XML/Query/ http://www.w3.org/standards/techs/xquery

XML Prague: http://www.xmlprague.cz/2010/index.html http://www.zorba-xquery.com/downloads/xmlprague/papers/pulcom

position.pdf http://download.28msec.com/sausalito/technical_reading/xqddf.pdf

11 november 2010 Hardcore XML - XQuery

Page 24: XQuery Novelties (XML Holland 2010 - hardcore xml)

24

Timeline

11 november 2010 Hardcore XML - XQuery

Page 25: XQuery Novelties (XML Holland 2010 - hardcore xml)

25

XQuery and XPath Full Text 1.0 example

for $b in /books/bookwhere $b/title

contains text "improving“ ftand "usability“ordered distance at most 2 words at start

return$b

11 november 2010 Hardcore XML - XQuery

Contains expression

Combined search

Advanced search criterium

Page 26: XQuery Novelties (XML Holland 2010 - hardcore xml)

26

XQuery Data Definition Facility example

declare collection users as element()*;

declare automatically maintained index users-by-idon nodes xqddf:collection( xs:QName(“users") )by @id as xs:string;

xqddf:insert-nodes(xs:QName(“users"), <user id=“geert”/> );

xqddf:probe-index-point(xs:QName(“users-by-id"), “geert” );

11 november 2010 Hardcore XML - XQuery