XML Query Language Changki Kim July 14 2005 MSE. 2 2 Contents  Introduction  XQuery Data Model  XQuery Expression Types  Implementations of XQuery.

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

Internet Technology Introduction Review the history of the Internet, Introducing Web Technology Web development Environment : Describe different HTML standards.
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
XML Views El Hazoui Ilias Supervised by: Dr. Haddouti Advanced XML data management.
A Graphical Environment to Query XML Data with XQuery
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.
14 1 Chapter 14 Database Connectivity and Web Development Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Tutorial 8 Sharing, Integrating and Analyzing Data
System Analysis and Design
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
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.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
ECA 228 Internet/Intranet Design I Intro to XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
XML, distributed databases, and OLAP/warehousing The semantic web and a lot more.
1 Networks and the Internet A network is a structure linking computers together for the purpose of sharing resources such as printers and files Users typically.
Chapter 16 The World Wide Web. 2 Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic HTML.
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
JSP Standard Tag Library
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
1 XML at a neighborhood university near you Innovation 2005 September 16, 2005 Kwok-Bun Yue University of Houston-Clear Lake.
XML in SQL Server Overview XML is a key part of any modern data environment It can be used to transmit data in a platform, application neutral form.
Query Processing with XML CSE 350 – Advanced Database Topics Jeffrey R. Ellis.
DATABASE and XML Moussa Mané. Learning Objectives ● Learn about Native XML Databases ● Learn about the conversion technology available ● Understand New.
IBM Research © 2005 IBM Corporation XJ: Robust XML Processing in Java™ Mukund Raghavachari, Rajesh Bordawekar, Michael Burke, and Igor Peshansky IBM T.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
WORKING WITH XSLT AND XPATH
XML Overview. Chapter 8 © 2011 Pearson Education 2 Extensible Markup Language (XML) A text-based markup language (like HTML) A text-based markup language.
CS1022 Computer Programming & Principles Lecture 1.2 A brief introduction to Python.
XML과 Database 홍기형 성신여자대학교 성신여자대학교 홍기형.
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
Chapter 16 The World Wide Web. 2 The Web is an infrastructure of distributed information combined with software that uses networks as a vehicle to exchange.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
XML & Mediators Thitima Sirikangwalkul Wai Sum Mong April 10, 2003.
1 XSLT An Introduction. 2 XSLT XSLT (extensible Stylesheet Language:Transformations) is a language primarily designed for transforming the structure of.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation An Introduction to XML.
Database Systems Part VII: XML Querying Software School of Hunan University
XML Databases by Sebastian Graf Hier beginnt mein toller Vortrag.
[ Part III of The XML seminar ] Presenter: Xiaogeng Zhao A Introduction of XQL.
Chapter 27 The World Wide Web and XML. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.27-2 Topics in this Chapter The Web and the Internet.
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.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
XML and Database.
XML stands for Extensible Mark-up Language XML is a mark-up language much like HTML XML was designed to carry data, not to display data XML tags are not.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
XFormsDB An XForms - Based Framework for Simplifying Web Application Development Markku Laine Master’s Thesis Presentation March 9, 2010.
INT-2: XQuery Levels the Data Integration Playing Field Carlo (Minollo) Innocenti DataDirect XML Technologies, Program Manager.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
The World Wide Web. What is the worldwide web? The content of the worldwide web is held on individual pages which are gathered together to form websites.
XML Databases – do they really exist? Jan Erik Kofoed BIBSYS Library Automation ELAG 2005 at CERN, Geneva.
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.
 INDEX  Overview.  Introduction.  System Requirement.  Features Of SQL.  Development Process.  System Design (SDLC).  Implementation.  Future.
Neo4j: GRAPH DATABASE 27 March, 2017
XML: Extensible Markup Language
Database Processing with XML
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Java Database Connectivity
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Database Connectivity and Web Development
Presentation transcript:

XML Query Language Changki Kim July MSE

2 2 Contents  Introduction  XQuery Data Model  XQuery Expression Types  Implementations of XQuery  XQuery API for Java  Conclusion

3 3 Introduction  XML (Extensible Markup language) – the format of choice for the exchange of information among various applications on the Internet – Its flexibility for representing many different kinds of information (multimedia presentation, database tables, web pages)  World Wide Web Consortium(W3C)  A series of standard : XML Schma, XPath,XSLT, and XQuery  XQuery – A requirement for a query language against data in XML data format. – Early Attempts to define a query language for XML data(XQL,XML- QL, Quilt) – In October 1999, W3C convened the XML QUery Working Group – XQuery 1.0:An XML Query Language.(2002)

4 4 Introduction  SQL & XQuery SQLXQuery Query language for relational tablesQuery language for XML Uses the table as basic modelUse the XML document as basic model Result is a table containing a set of row Result is complex XML sequence  XQuery goes beyond the functionality of relational query language – It is often thought of as a native XML programming language – Only XML data is complex, the operations for processing XML are simple. – XQuery can easily search any XML structure with predefined expressions. – Even when the data is not physically stored as XML, XQuery can be used with middleware that provides an XML view of the data.  XQUery is widely used for data integration!!!!!

5 5 XQuery Data Model  The input and output is defined in terms of the XQuery1.0 and XPath2.0 data model  The data model is based on the notion of a sequence. (sequence>item>node or atomic value)  The output sequence may be heterogeneous. However the result of the operation is single-level sequence of nodes and atomic values.

6 6 XQuery Expression Types  There are 7 types of expressions in XQuery – Path expressions. – Element constructors. – FLWR expression, – Expressions involving operators and functions – Conditional expression. – Quantified expression.  The expressions can be used together both sequentially and nested  Path expression – It is used to locate nodes in XML data. – It consists of a series of one or more steps, separated by slash,/, or double slash, // – Example : document(“books.xml”)//book, document(“books.xml”)/bib/book/author[last=“Stevens”]

7 7 XQuery Expression Types  Element constructors – It is used when a query needs to create new elements. – Example : date(“ ”)  FLWR expressions – It is the analogue of the SELECT FROM-WHERE construction in SQL. – Example : for $b in document(“books.xml”)//book where = “2000” return $$b/title  Expressions involving operators and functions – Built-in function (AVG,SUM,COUNT,DOCUMENT,EMPTY)  Conditional expressions – IF-THEN-ELSE  Quantified expressions – SOME(existential) and EVERY(universial)

8 8 Implementation of XQuery  Currently several implementations of XQuery are available. – References to Xquery Implementations. X-Hive: Fatdog: Kawa-XQuery: Kweelt: Lucent: Microsoft: Openlink Software: QuiP (Software AG): XQuench:  The goal of implementation is to investigate implementability and usability of XQuery and to provide feedback to the W3C XML Query Working Group.

9 9 Implementation of XQuery  X-Hive (active member of W3C) – This company provides on-line XQuery demo. – The Query I wrote on the browser is running on top X-Hive/DB – The result is returned in less than 5 seconds

10 XQuery API for Java(XQJ)  XQJ is an API designed to support the XQuery language, just like the JDBC API supports the SQL query language.  The XQJ standard (JSR 225) is being developed under the Java Community Process. – For more information,  DataDirect XQuery is a Java implementation of XQuery that uses the XQuery API for Java (XQJ) for accessing both XML and relational sources.

11 XQuery API for Java(XQJ)  XQJ sample Java code to execute an XQuery query //import the XQJ classes import com.ddtek.xquery.alpha.*; import com.ddtek.xquery.xqj.mediator.DDXQDataSource; // establish a connection to a DataDirect XQuery data source DDXQDataSource ds = new DDXQDataSource( ); ds.setConfigFile("stockconfigfile.xml"); XQConnetion conn = ds.getConnection("myuserid", "mypswd"); // create an expression object that is used to execute // an XQuery query XQExpression expr = conn.createExpression(); // the XQuery query String es = "for $h in collection('HOLDINGS')/Holdings“ + "where ($h/STOCKTICKER='AMZN'“ + "return $h"; // execute the XQuery query XQResultSequence result = expr.executeQuery(es); System.out.println(result.getSequenceAsString()); // free all resources result.close(); expr.close(); conn.close();

12 Shortcomings  XQuery is still in the W3C Working Draft stage. – Update query (including insert query) is not specified in the current XQuery 1.0 drafts. – It does not contain full text search facilities ”Find all elements containing a particular word”. – It has backward compatibility with XPath1.0 – There are other minor issues( inconsistencies with and between the working drafts)

13 Conclusion  XQuery is a very promising initiative in defining the standard for query and retrieval of XML. – It is a functional language consisting of several types of expressions. – It is defined in terms of a data model based on heterogeneous sequences of nodes and atomic values. – Currently, Design of the XQuery is an ongoing activity of the W3C XML Query Working Group.  XQuery will help XML to realize its potential as a universal in formation representation.

14 Reference  Useful web site. – – – – – (XQJ)  Paper – D.Chamberlin.”Xquery: An XML Query Language,” IBM System Journal, Vol 41, No 4, 2002