4/15/2002Bo Du 1 - Bo Du, April 15, 2002. XML - QL A Query Language for XML.

Slides:



Advertisements
Similar presentations
XML e X tensible M arkup L anguage (XML) By: Albert Beng Kiat Tan Ayzer Mungan Edwin Hendriadi.
Advertisements

XML: Extensible Markup Language
XML May 3 rd, XQuery Based on Quilt (which is based on XML-QL) Check out the W3C web site for the latest. XML Query data model –Ordered !
XML, XML Schema, Xpath and XQuery Slides collated from various sources, many from Dan Suciu at Univ. of Washington.
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
CSE 6331 © Leonidas Fegaras XML and Relational Databases 1 XML and Relational Databases Leonidas Fegaras.
Relational Databases for Querying XML Documents: Limitations & Opportunities VLDB`99 Shanmugasundaram, J., Tufte, K., He, G., Zhang, C., DeWitt, D., Naughton,
Database Management Systems, R. Ramakrishnan1 Introduction to Semistructured Data and XML Chapter 27, Part D Based on slides by Dan Suciu University of.
Agenda from now on Done: SQL, views, transactions, conceptual modeling, E/R, relational algebra. Starting: XML To do: the database engine: –Storage –Query.
Managing XML and Semistructured Data Lecture 8: Query Languages - XML-QL Prof. Dan Suciu Spring 2001.
Web-site Management System Strudel Presented by: LAKHLIFI Houda Instructor: Dr. Haddouti.
From Semistructured Data to XML: Migrating The Lore Data Model and Query Language Roy Goldman, Jason McHugh, Jennifer Widom Stanford University
QSX (LN 3)1 Query Languages for XML XPath XQuery XSLT (not being covered today!) (Slides courtesy Wenfei Fan, Univ Edinburgh and Bell Labs)
XQuery: 1 W3C (World Wide Web Consortium) What is W3C? –An industry consortium, best known for standardizing HTML and XML. –Working Groups create or adopt.
1 COS 425: Database and Information Management Systems XML and information exchange.
XML - QL A Query Language for XML Version /2000XML-QL2 Outline * Introduction * Examples in XML-QL * A Data Model for XML * Advanced Examples in.
1 Statistics XML: –Altavista: 800,000 pages returned. –Amazon.com: 242 books. In comparison: –God: 12,000 books, 7 Million pages –Bible: 32,000 books,
1 XML and QUERY Shilpi Ahuja CSE Data Mining 4 th April 2002.
1 New Ways of Querying the Web by Eliahu Brodsky and Alina Blizhovsky.
Database Systems and XML David Wu CS 632 April 23, 2001.
XML Introduction What is XML –XML is the eXtensible Markup Language –Became a W3C Recommendation in 1998 –Tag-based syntax, like HTML –You get to make.
ebis/etat/ebuy/xdia Joint Effort ebis/etat/ebuy/xdia Joint Effort2 Introduction Extensible Markup language XML SCHEMA DTD.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Fundamentals, Design, and Implementation, 9/e Text and XML databases Instructor: Dragomir R. Radev Winter 2005.
Putting Semi-structured Data to Practice Alon Levy Seattle, Washingon University of Washington.
1 Lecture 08: XML and Semistructured Data. 2 Outline XML (Section 17) –XML syntax, semistructured data –Document Type Definitions (DTDs) XPath.
1 Lecture 08: XML and Semistructured Data. 2 Outline XML (Section 17) –XML syntax, semistructured data –Document Type Definitions (DTDs) XPath.
(C) 2000, The University of Michigan 1 Database Application Design Handout #11 March 24, 2000.
4/20/2017.
Main challenges in XML/Relational mapping Juha Sallinen Hannes Tolvanen.
XML-to-Relational Schema Mapping Algorithm ODTDMap Speaker: Artem Chebotko* Wayne State University Joint work with Mustafa Atay,
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation Document Type Definition.
XML-QL A Query Language for XML Charuta Nakhe
Dr. Azeddine Chikh IS446: Internet Software Development.
Dan SuciuTools for XML Data Exchange Dan Suciu AT&T Labs Joint work with Mary Fernandez.
XML and XPath. Web Services: XML+XPath2 EXtensible Markup Language (XML) a W3C standard to complement HTML A markup language much like HTML origins: structured.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
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 XQuery.
Cornell CS 502 More XML XHTML, namespaces, DTDs CS 502 – Carl Lagoze – Cornell University.
XML과 Database 홍기형 성신여자대학교 성신여자대학교 홍기형.
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
FIGIS’ML Hands-on training - © FAO/FIGIS An introduction to XML Objectives : –what is XML? –XML and HTML –XML documents structure well-formedness.
By Mohsen ashouri.  Introduction  Comparison between XML and HTML  XML Syntax  Challenges  Summary.
JSTL, XML and XSLT An introduction to JSP Standard Tag Library and XML/XSLT transformation for Web layout.
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
1 What Is XML? eXtensible Markup Language for data –Standard for publishing and interchange –“Cleaner” SGML for the Internet Applications: –Data exchange.
Of 41 lecture 4: rdf – basics and language. of 41 RDF basic ideas the fundamental concepts of RDF  resources  properties  statements ece 720, winter.
Lecture 6: XML Query Languages Thursday, January 18, 2001.
Lecture 5: XML Tuesday, January 16, Outline XML, DTDs (Data on the Web, 3.1) Semistructured data in XML (3.2) Exporting Relational Data in XML (8.3.1)
[ Part III of The XML seminar ] Presenter: Xiaogeng Zhao A Introduction of XQL.
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.
1 Introduction to Semistructured Data and XML. 2 How the Web is Today  HTML documents often generated by applications consumed by humans only easy access:
More XML: semantics, DTDs, XPATH February 18, 2004.
XML and Database.
XML e X tensible M arkup L anguage (XML) By: Albert Beng Kiat Tan Ayzer Mungan Edwin Hendriadi.
Well Formed XML The basics. A Simple XML Document Smith Alice.
Structured Documents - XML and FrameMaker 7 Asit Pant.
IS432 Semi-Structured Data Lecture 6: XQuery Dr. Gamal Al-Shorbagy.
Semi-structured Data In many applications, data does not have a rigidly and predefined schema: –e.g., structured files, scientific data, XML. Managing.
Lecture 17: XPath and XQuery Wednesday, Nov. 7, 2001.
임 순 범 숙명여대 정보과학부 멀티미디어학과 1 III. XML-QL 멀티미디어 데이터베이스 ( ~11.1)
XML: Extensible Markup Language
Querying and Transforming XML Data
eXtensible Markup Language (XML)
Alin Deutsch, University of Pennsylvania Mary Mernandez, AT&T Labs
Lecture 9: XML Monday, October 17, 2005.
CSE591: Data Mining by H. Liu
Semi-structured Data In many applications, data does not have a rigidly and predefined schema: e.g., structured files, scientific data, XML. Managing such.
Introduction to Database Systems CSE 444 Lecture 10 XML
Lecture 11: XML and Semistructured Data
Presentation transcript:

4/15/2002Bo Du 1 - Bo Du, April 15, 2002

XML - QL A Query Language for XML

4/15/2002Bo Du 3 OUTLINE  Introduction * Examples in XML-QL * A Data Model for XML * Advanced Examples in XML-QL * Extensions and Open Issues  Summary

4/15/2002Bo Du 4 Why do we need a query language XML standard doesn't address: Extraction : How will data be extracted from large XML documents? Transformation : How will XML data be exchanged between user communities using different but related DTDs? Integration : How will XML data from multiple XML sources be integrated? Conversion of data between relational or OO to XML

4/15/2002Bo Du 5 Useful References ……

4/15/2002Bo Du 6 Is this X?L a standard? NO! It is a submission to the World Wide Web Consortium. It is intended for review and comment by W3C members and is subject to change!!!

4/15/2002Bo Du 7 What does XML-QL do exactly?  Extraction - of data pieces from XML documents  Transformation - Map XML data between different DTDs  Integration/Combination of XML data from different sources

4/15/2002Bo Du 8 How will data be extracted from large XML documents?

4/15/2002Bo Du 9 Data Transformation

4/15/2002Bo Du 10 Data Integration

4/15/2002Bo Du 11 Requirements for the XML Query Language Selection and extraction Preserve structure Reduction Restructuring Join (more detail in next section)

4/15/2002Bo Du 12 OUTLINE  Introduction * Examples in XML-QL * A Data Model for XML * Advanced Examples in XML-QL * Extensions and Open Issues  Summary

4/15/2002Bo Du 13 Bib.xml An Introduction to Database Systems Date Addison-Wesley Foundation for Object/Relational Databases: The Third Manifesto Date Darwen Addison-Wesley

4/15/2002Bo Du 14 Bib.dtd

4/15/2002Bo Du 15 Basic Examples: Selection/Extraction Find all the names of the authors whose publisher is Addison-Wesley: WHERE Addison-Wesley $t $a IN " CONSTRUCT $a

4/15/2002Bo Du 16 Basic Examples(contd.) The use of instead of : WHERE Addison-Wesley $t $a IN " CONSTRUCT $a

4/15/2002Bo Du 17 Results of our first query The output is in XML form: Date Darwen Date

4/15/2002Bo Du 18 Use the current XML to construct a new XML structure An Introduction to DB Systems Date Addison-Wesley Foundations for OR Databases Date Darwen Addison-Wesley

4/15/2002Bo Du 19 Construct new XML data (Query) WHERE Addison-Wesley $t $a IN " CONSTRUCT $a $t

4/15/2002Bo Du 20 Construct new XML data (Result) Date An Introduction to DB Systems Date Foundation for OR Databases Darwen Foundation for OR Databases

4/15/2002Bo Du 21 Grouping with Nested Queries: Preserve structure WHERE $p IN " Addison-Wesley IN $p, $t IN $p CONSTRUCT $t WHERE $a IN $p CONSTRUCT $a

4/15/2002Bo Du 22 Reduction of previous slide Where Addition-wesley $t Element_As $x  $a Element_As $y  IN Construct $x $y

4/15/2002Bo Du 23 Another way: WHERE Addison-Wesley $t CONTENT_AS $p IN " CONSTRUCT $t WHERE $a IN $p CONSTRUCT $a

4/15/2002Bo Du 24 Result An Introduction to Database Systems Date Foundation for Object/Relational Databases: The Third Manifesto Date Darwen

4/15/2002Bo Du 25 OUTLINE  Introduction * Examples in XML-QL * A Data Model for XML * Advanced Examples in XML-QL * Extensions and Open Issues  Summary

4/15/2002Bo Du 26 XML Data model XML Graph Syntax for Data Mapping of XML graphs into XML documents Element identities an ID references …… (talked in previous presentations)

4/15/2002Bo Du 27 OUTLINE  Introduction * Examples in XML-QL * A Data Model for XML * Advanced Examples in XML-QL * Extensions and Open Issues  Summary

4/15/2002Bo Du 28 Advanced examples in XML-QL Tag Variables Regular - path Expressions Transforming XML data Integrating from multiple XML sources Functions definitions and DTDs External functions Ordered model - Sorting, Indexing

4/15/2002Bo Du 29 Tag variables WHERE -- $p can be {article, book} $t 1995 Date IN "bib.xml", $e IN {author, editor} CONSTRUCT $t Date All publications published in 1995 in which Date is either an author, or an editor

4/15/2002Bo Du 30 Query result Date An Introduction to Database Systems Date The New Jersey Machine-Code Toolkit

4/15/2002Bo Du 31 payroll.xml J. Doe M. Smith R. Johnson P. Kent 33000

4/15/2002Bo Du 32 taxpayers.xml

4/15/2002Bo Du 33 Integrating data from multiple XML sources WHERE ELEMENT_AS $n $ssn IN ”payroll.xml", -- take a look at payroll.XML $ssn ELEMENT_AS $i IN "taxpayers.xml” -- take a look at taxpayer.xml CONSTRUCT $n $i

4/15/2002Bo Du 34 Integration result J. Doe M.Smith R. Johnson

4/15/2002Bo Du 35 Functions definitions and DTDs function query() { CONSTRUCT findDeclaredIncomes("taxpayers.xml","payroll.xml") } function findDeclaredIncome($Taxpayers,$Employees) { WHERE $s $x IN $Taxpayer, $s $n IN $Employees CONSTRUCT $n $x }

4/15/2002Bo Du 36 Functions definitions and DTDs (cont) Restrictions by DTD’s: function findDeclaredIncome ( $Taxpayers:” $Employees:” dtd” :“ ) { WHERE …. CONSTRUCT …. }

4/15/2002Bo Du 37 Embedding queries in data WHERE $t $y IN “ $y > 1995 CONSTRUCT $t WHERE $t $y IN “ $y >1995 CONSTRUCT $t

4/15/2002Bo Du 38 Indexes for element: XML support element-order variables. Example: … here $i and $j are bind to an integer 0, 1, 2 … that represent the index in the local order of the edges.

4/15/2002Bo Du 39 Indexes for element (graph) (year=“1995”) book [0] book[1] title[0] author[2] publisher[1] title[0] author[3] author[2] name[0] An introduction … Addison- Wesley Foundations for... name[0] lastname[0] Date Datwen lastname[0] publisher[1] (year=“1998”) ( 1 ) ( 13 ) ( 12 ) ( 11 ) ( 10 ) ( 9 ) ( 8 ) ( 7 ) ( 5 ) ( 6 ) ( 4)( 3 ) ( 2 ) ( 15 ) ( 14 ) root

4/15/2002Bo Du 40 Indexes for element: (cont.) Example : retrieves all the persons whose lastname precedes the firstname : WHERE $p IN “ $x IN $p, $y IN $p, $j < $k CONSTRUCT $p

4/15/2002Bo Du 41 ORDER-BY: (cont.) Reverse the order of all authors in a publication: WHERE $p IN “ CONSTRUCT WHERE $a IN $p ORDER-BY $k DESCENDING CONSTRUCT $a WHERE $v IN $p $e != “author” CONSTRUCT $v

4/15/2002Bo Du 42 OUTLINE  Introduction * Examples in XML-QL * A Data Model for XML * Advanced Examples in XML-QL * Extensions and Open Issues  Summary

4/15/2002Bo Du 43 Extensions and open issues: Entities User-defined predicates String regular expressions Name spaces Aggregates XML syntax Extensions to other XML-related standard

4/15/2002Bo Du 44 OUTLINE  Introduction * Examples in XML-QL * A Data Model for XML * Advanced Examples in XML-QL * Extensions and Open Issues  Summary

4/15/2002Bo Du 45 Summary/Conclusions XML-QL is a declarative language which provides support for querying, constructing, transforming, and integrating XML data XML-QL supports both ordered and unordered view on XML document XML-QL is based on similar database research suggested model of Semi-structured data XML-QL satisfy the absolute set of requirements from query language cited in XML Query Requirements of W3C Working Draft XML-QL is good candidate to be the new XML standard query language

4/15/2002Bo Du 46 End ???…