XQuery Leah Andrews. Overview  Queries data stored in XML trees  Declarative  High-level  Functional (no side effects)  Strongly typed  Nodes 

Slides:



Advertisements
Similar presentations
Chungnam National University DataBase System Lab
Advertisements

XML: Extensible Markup Language
1 XML Data Management Course Outline and Organisation Werner Nutt.
XQuery John Annechino Steven Pow. Agenda What is XQuery? Uses of XQuery XQuery vs. XSLT Syntax –Built-In Functions –FLWOR –if-then-else –User-Defined.
XQUERY. What is XQuery? XQuery is the language for querying XML data The best way to explain XQuery is to say that XQuery is to XML what SQL is to database.
1 XQuery Web and Database Management System. 2 XQuery XQuery is to XML what SQL is to database tables XQuery is designed to query XML data What is XQuery?
Friday, September 4 th, 2009 The Systems Group at ETH Zurich XML and Databases Exercise Session 6 courtesy of Ghislain Fourny/ETH © Department of Computer.
XSLT XML DBs, and Schemas Week 18 DSA. The Whisky Case study XSLT can be applied in the client. –Add a xml processing instruction to the xml to bind to.
DSA Semester 2. XML Tagged data Hello A really interesting course, well taught Interchange of data RSS, BPEL4WS, RossettaNet … Structure document representation.
XML, XSLT, XPath, XQuery 5 Aug Introduction XML (eXtensible Markup Language) –Holding data XSLT (eXtensible Style Language Transform) –Transform.
Introduction to XQuery and eXist DSA. XSLT Tutorial Problems Bad language : – No ! – for XML schema –Some XSLT engines tolerant of extra tags (permissive),
XML Workshop XSLT. XML Tagged data Hello A really interesting course, well taught Interchange of data RSS, BPEL4WS, RossettaNet … Structure document representation.
1 COS 425: Database and Information Management Systems XML and information exchange.
XQuery – The W3C XML Query Language Jonathan Robie, Software AG Don Chamberlin, IBM Research Daniela Florescu, INRIA.
Storing and Querying Ordered XML Using a Relational Database System By Khang Nguyen Based on the paper of Igor Tatarinov and Statis Viglas.
XML, XPATH and JDOM ICW Lecture 9 Hasan Qunoo. Recap -XML document structure. -XML parsers. -JDOM: -Package Info. -Load An XML document. -Saving An XML.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
1 Advanced Topics XML and Databases. 2 XML u Overview u Structure of XML Data –XML Document Type Definition DTD –Namespaces –XML Schema u Query and Transformation.
Overview of XPath Author: Dan McCreary Date: October, 2008 Version: 0.2 with TEI Examples M D.
Introduction to XPath Bun Yue Professor, CS/CIS UHCL.
XQuery Your gateway to manipulating XML in SQL Server 2005.
2.2 SQL Server 2005 的 XML 支援功能. Overview XML Enhancements in SQL Server 2005 The xml Data Type Using XQuery.
XML, CFMX CFML & SQL XML Kevin Penny, MMCP
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
Comparing XSLT and XQuery Michael Kay XTech 2005.
XML DOCUMENTS & DATABASES. Summary of Introduction to XML HTML vs. XML HTML vs. XML Types of Data Types of Data Basics of XML Basics of XML XML Syntax,
Lecture 6 of Advanced Databases XML Querying & Transformation Instructor: Mr.Eyad Almassri.
1 XPath XPath became a W3C Recommendation 16. November 1999 XPath is a language for finding information in an XML document XPath is used to navigate through.
Session II Chapter 2 – Chapter 2 – XSLhttp://
Sofia, Bulgaria | 9-10 October Using XQuery to Query and Manipulate XML Data Stephen Forte CTO, Corzen Inc Microsoft Regional Director NY/NJ (USA) Stephen.
1 XML Data Management Course Outline and Organisation Werner Nutt.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation eXist Update Lecturer.
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
Lecture 22 XML querying. 2 Example 31.5 – XQuery FLWOR Expressions ‘=’ operator is a general comparison operator. XQuery also defines value comparison.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
Information Management XML and Databases hussein suleman uct cs
XPath Aug ’10 – Dec ‘10. XPath   XML Path Language   Technology that allows to select a part or parts of an XML document to process   XPath was.
XSLT Streaming Terminology Understanding “Climbing” Roger L. Costello January 29, 2014.
XML Databases by Sebastian Graf Hier beginnt mein toller Vortrag.
XML query. introduction An XML document can represent almost anything, and users of an XML query language expect it to perform useful queries on whatever.
CS 157B: Database Management Systems II February 20 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
Unit 3 — Advanced Internet Technologies Lesson 11 — Introduction to XSL.
XML Query: xQuery Reference: Xquery By Priscilla Walmsley, Published by O’Reilly.
Session II Chapter 3 – Chapter 3 – XPath Patterns & Expressions Chapter 4 – XPath Functions Chapter 15 – XPath 2.0http://
Friday, September 4 th, 2009 The Systems Group at ETH Zurich XML and Databases Exercise Session 5 courtesy of Ghislain Fourny/ETH © Department of Computer.
Martin Kruliš by Martin Kruliš (v1.1)1.
CSE3201/CSE4500 XPath. 2 XPath A locator for items in XML document. XPath expression gives direction of navigation.
XPath --XML Path Language Motivation of XPath Data Model and Data Types Node Types Location Steps Functions XPath 2.0 Additional Functionality and its.
Lecture 23 XQuery 1.0 and XPath 2.0 Data Model. 2 Example 31.7 – User-Defined Function Function to return staff at a given branch. DEFINE FUNCTION staffAtBranch($bNo)
1 XPath. 2 Agenda XPath Introduction XPath Nodes XPath Syntax XPath Operators XPath Q&A.
1 The XPath Language. 2 XPath Expressions Flexible notation for navigating around trees A basic technology that is widely used uniqueness and scope in.
XSLT, XML Schema, and XPath Matt McClelland. Introduction XML Schema ▫Defines the content and structure of XML data. XSLT ▫Used to transform XML documents.
1 XML and XML in DLESE Katy Ginger November 2003.
Slice & dice the Web with XmlPL, The XML Processing Language A presentation for Boise Code Camp 2007 Joseph Coffland Cauldron Development LLC.
XML: Extensible Markup Language
Querying and Transforming XML Data
Session IV Chapter 16 – XQuery
CWA3 Standardized roll-out package Part 2: XBRL Handbook for Declarers
{ XML Technologies } BY: DR. M’HAMED MATAOUI
XML in Web Technologies
Querying XML XQuery.
Querying XML XQuery.
Querying XML XPath.
Querying XML XPath.
Presented by: Jacky Ma Date: 11 Dec 2001
2/18/2019.
Querying XML XSLT.
Session II Chapter 16 – XQuery
XML DOCUMENTS & DATABASES
Presentation transcript:

XQuery Leah Andrews

Overview  Queries data stored in XML trees  Declarative  High-level  Functional (no side effects)  Strongly typed  Nodes  Atomic values (integers, strings, booleans)

Origins  Became a W3 standard in January, 2007  Developed by Jonathan Robie, Don Chamberlin and Daniela Florescu  Compatible with other W3 standards  XML (namespaces, Schema), XSLT, XPath

XQuery v. XSLT  Overlapping capabilities  Share a data model, type system, function library and XPath

XQuery > XSLT  Better usability  More concise  Other languages can be embedded  More Orthogonal  Can be expressed in XML syntax (XQueryX)

XSLT > XQuery  Better for small-scale changes to XML documents  Widespread use  More flexible for transformations

XQuery does NOT support:  Full text search capacity  Updating XML documents or databases  Dynamic typing  Polymorphism

FLWOR  FOR  LET  WHERE  ORDER BY  RETURN

1 MacBook olive 2 WinBook orange 3 Toshiba orange 4 Gateway green 5 Asus rainbow 6 ZT black 7 IMB unknown 8 MacBook German

xquery version "1.0"; All students { for $x in doc("students.xml")/class/students order by $x/studentId return { $x } }

xquery version "1.0"; Students with an id less than 5 { for $x in doc("students.xml")/class/students where $x/studentId<5 order by $x/studentId return }

xquery version "1.0"; Favorite (student) colors { for $x in doc("students.xml")/class/students/favoritecolor return {data($x)} }