Fegaras & Elmasri UTA 1 VLDB 2001 Query Engines for Web-Accessible XML Data Leonidas Fegaras Ramez Elmasri University of Texas at Arlington.

Slides:



Advertisements
Similar presentations
Native XML Database or RDBMS. Data or Document orientation If you are primarily storing documents, then a Native XML Database may be the best option.
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 !
CSE 6331 © Leonidas Fegaras XML and Relational Databases 1 XML and Relational Databases Leonidas Fegaras.
Object Databases Baochuan Lu. outline Concepts for Object Databases Object Database Standards, Languages, and Design Object-Relational and Extended-Relational.
Relational Databases for Querying XML Documents: Limitations & Opportunities VLDB`99 Shanmugasundaram, J., Tufte, K., He, G., Zhang, C., DeWitt, D., Naughton,
Agenda from now on Done: SQL, views, transactions, conceptual modeling, E/R, relational algebra. Starting: XML To do: the database engine: –Storage –Query.
Query Languages Aswin Yedlapalli. XML Query data model Document is viewed as a labeled tree with nodes Successors of node may be : - an ordered sequence.
1 COS 425: Database and Information Management Systems XML and information exchange.
1 Lecture 13: Database Heterogeneity Debriefing Project Phase 2.
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.
1 Lecture 13: Database Heterogeneity. 2 Outline Database Integration Wrappers Mediators Integration Conflicts.
Summary. Chapter 9 – Triggers Integrity constraints Enforcing IC with different techniques –Keys –Foreign keys –Attribute-based constraints –Schema-based.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Object-Oriented Methods: Database Technology An introduction.
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.
Indexing XML Data Stored in a Relational Database VLDB`2004 Shankar Pal, Istvan Cseri, Gideon Schaller, Oliver Seeliger, Leo Giakoumakis, Vasili Vasili.
XMLII XSchema XSchema XQuery XQuery. XML Schema XML Schema is a more sophisticated schema language which addresses the drawbacks of DTDs. Supports XML.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
4/20/2017.
Module 17 Storing XML Data in SQL Server® 2008 R2.
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
XML, distributed databases, and OLAP/warehousing The semantic web and a lot more.
Database Design for DNN Developers Sebastian Leupold.
Databases C HAPTER Chapter 10: Databases2 Databases and Structured Fields  A database is a collection of information –Typically stored as computer.
By: Blake Peters.  OODB- Object Oriented Database  An OODB is a database management system in which information is represented in the form of objects.
Leonidas Fegaras May Query Processing of XML Data Leonidas Fegaras University of Texas at Arlington.
Lecture 21 XML querying. 2 XSL (eXtensible Stylesheet Language) In HTML, default styling is built into browsers as tag set for HTML is predefined and.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
CSE 6331 © Leonidas Fegaras XML1 Introduction to XML Leonidas Fegaras.
Context Tailoring the DBMS –To support particular applications Beyond alphanumerical data Beyond retrieve + process –To support particular hardware New.
1 XML-KSI, 2004 XML- : an extendible framework for manipulating XML data Jaroslav Pokorny Charles University Praha.
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.
XML과 Database 홍기형 성신여자대학교 성신여자대학교 홍기형.
XML as a Boxwood Data Structure Feng Zhou, John MacCormick, Lidong Zhou, Nick Murphy, Chandu Thekkath 8/20/04.
The main mathematical concepts that are used in this research are presented in this section. Definition 1: XML tree is composed of many subtrees of different.
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
Querying Structured Text in an XML Database By Xuemei Luo.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
1 What Is XML? eXtensible Markup Language for data –Standard for publishing and interchange –“Cleaner” SGML for the Internet Applications: –Data exchange.
Object Persistence (Data Base) Design Chapter 13.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
1 Design Issues in XML Databases Ref: Designing XML Databases by Mark Graves.
5/2/20051 XML Data Management Yaw-Huei Chen Department of Computer Science and Information Engineering National Chiayi University.
CSE 6331 © Leonidas Fegaras XML Research at UTA.
An OO schema language for XML SOX W3C Note 30 July 1999.
Declaratively Producing Data Mash-ups Sudarshan Murthy 1, David Maier 2 1 Applied Research, Wipro Technologies 2 Department of Computer Science, Portland.
BNCOD07Indexing & Searching XML Documents based on Content and Structure Synopses1 Indexing and Searching XML Documents based on Content and Structure.
Scaling Heterogeneous Databases and Design of DISCO Anthony Tomasic Louiqa Raschid Patrick Valduriez Presented by: Nazia Khatir Texas A&M University.
CSE 6331 © Leonidas Fegaras OODB1 Object-Oriented Databases and the ODMG Standard.
XML and Its Applications Ben Y. Zhao, CS294-7 Spring 1999.
XML and Database.
Object Oriented Database By Ashish Kaul References from Professor Lee’s presentations and the Web.
Query Optimization CMPE 226 Database Systems By, Arjun Gangisetty
CSE 6331 © Leonidas Fegaras XQuery 1 XQuery Leonidas Fegaras.
Experience with XML Schema Ashok Malhotra Schema Usage  Mapping XML Schema and XML documents controlled by the Schema to object classes and instances.
1 Storing and Maintaining Semistructured Data Efficiently in an Object- Relational Database Mo Yuanying and Ling Tok Wang.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
SEMI-STRUCTURED DATA (XML) 1. SEMI-STRUCTURED DATA ER, Relational, ODL data models are all based on schema Structure of data is rigid and known is advance.
Lecture 9 Symbol Table and Attributed Grammars
XML: Extensible Markup Language
Object-Oriented Databases and the ODMG Standard
Query Processing of XML Data
Semi-Structured data (XML Data MODEL)
Object Databases: Logical Data Modeling
XQuery Leonidas Fegaras.
Semi-Structured data (XML)
Presentation transcript:

Fegaras & Elmasri UTA 1 VLDB 2001 Query Engines for Web-Accessible XML Data Leonidas Fegaras Ramez Elmasri University of Texas at Arlington

Fegaras & Elmasri UTA 2 VLDB 2001 Adding XML Support to an OODB I will present: an extension to ODMG ODL, called XML- ODL; an extension to ODMG OQL, called XML- OQL; a mapping from XML-ODL to ODL; a translation scheme from XML-OQL queries into efficient OQL code.

Fegaras & Elmasri UTA 3 VLDB 2001 Design Goals We wanted to: provide full XML functionality to the data model and query language of an existing DBMS ( -DB); provide uniform access of: database data, database-resident XML data (both schema-based & schema-less), and web-accessible XML data (native form), in the same query language; facilitate effective data storage and efficient query evaluation based on schema information (when available); provide clear, compositional semantics; avoid data translation.

Fegaras & Elmasri UTA 4 VLDB 2001 Why Object-Oriented Databases? It is easier and more natural to map nested XML elements to nested collections than to flat tables; The translation of syntactic extensions into the core query language may create many levels of nested queries. But SQL supports very limited forms of query nesting, group-by, sorting, etc. e.g. it is difficult to translate an XML query that constructs XML elements on the fly into SQL. OQL can become a full-fledged XML query language with minimal effort. OQL already provides: sorting, arbitrary nesting of queries, grouping & aggregation, universal & existential quantification, random access of list sub-elements.

Fegaras & Elmasri UTA 5 VLDB 2001 Related Work Many XML query languages (XQL, Quilt, XML-QL, Lorel, Ozone, POQL, WebOQL, X- OQL,…) and a possible standard (XQuery). Some XML projects use OODB technology: Lore, YAT/Xyleme, eXcelon, … More recently (June 2001), XQuery has been given typing rules and formal semantics (a mapping from XQuery to Core XQuery).

Fegaras & Elmasri UTA 6 VLDB 2001 What is New Here? The design of our language extensions was driven by semantics, not standards. We provide complete, compositional semantics, which is also used as an effective translation scheme. In our semantics:  schema-less, schema-based, and web-accessible XML data, as well as OODB data, can be handled together in the same query;  schema-less queries do not have to change when a schema is given (static errors supersede run-time errors);  schema information, when provided, is utilized for effective storage and efficient query processing.

Fegaras & Elmasri UTA 7 VLDB 2001 XML-OQL = OQL + Syntactic Extensions Path expressions: e.Atag projection e._any projection e. * wildcard projection (all descendants) attribute projection e[\v  e’]filtering e[e']indexing Element construction: e 1,..., e n Entry points: retrieve(“handle”)database-resident XML data document(“file.xml”)native form

Fegaras & Elmasri UTA 8 VLDB 2001 select b.author.lastname, b.title, select r.title from r in from b in document("bibliography.xml").bib.*.book where b.year>1995 and count(b.author)>2 and b.title like "% Emacs %“ An XML-OQL Example "Cameron", "Rosenblatt", "Raymond", ”Learning GNU Emacs”, ”GNU Emacs and XEmacs”, ”GNU Emacs Manual” Amazon Learning GNU Emacs O'Reilly Debra Cameron Bill Rosenblatt Eric Raymond Result

Fegaras & Elmasri UTA 9 VLDB 2001 Schema-Less (Generic) Mapping A fixed ODL schema for storing schema-less XML data: class XML_element ( extent Elements ) {attributeelement_typeelement; }; union element_type switch ( element_kind ) {case TAG:node_typetag; case PCDATA:stringdata; }; struct node_type {stringname; list attributes; list content; };

Fegaras & Elmasri UTA 10 VLDB 2001 Translation of XML-OQL Paths For example, e.A is translated into: select y from x in e, y in ( case x.element of PCDATA: list( ), TAG: ifx.element.tag.name = “A” then x.element.tag.content else list( ) end ) Wildcard projection, e. *, requires a transitive closure (a recursive OQL function).

Fegaras & Elmasri UTA 11 VLDB 2001 XML-ODL XML-ODL incorporates Xduce-style XML types into ODL: ()identity A[t]tagged type {A 1 :s 1,…,A n :s n } ttype with attributes (s 1,…,s n are simple types) t 1, t 2 concatenation t 1 | t 2 alternation t*repetition t?optionality anyschema-less XML integer string XML[t] may appear anywhere an ODL type is expected.

Fegaras & Elmasri UTA 12 VLDB 2001 XML-ODL Example bib[ vendor[ { id: ID } ( name[string], [string], book[ { ISBN: ID, related_to: bib.vendor.book.ISBN* } ( title[string], publisher[string]?, year[integer], price[integer], author[ firstname[string]?, lastname[string] ]+ ) ]* ) ]* ]

Fegaras & Elmasri UTA 13 VLDB 2001 XML-ODL to ODL Mapping Some mapping rules: [ A[t] ]  [ t ] [ t 1, t 2 ]  struct { [ t 1 ] fst; [ t 2 ] snd; } [ t 1 | t 2 ]  union (utag) { case LEFT: [ t 1 ] left; case RIGHT: [ t 2 ] right; } [ t* ]  list If it has an ID attribute, [ {A 1 :s 1,…,A n :s n } t ] is mapped to a class; otherwise, it is mapped to a struct.

Fegaras & Elmasri UTA 14 VLDB 2001 XML-OQL to OQL Mapping [ t ] x e.A maps the XML path e.A into OQL code, given that the type of e is t and the mapping of e is x. Some mapping rules: [ A[t] ] x e.A  x [ B[t] ] x e.A  empty [ t 1 ] x.fst e.A if [ t 2 ] x.snd e.A is empty [ t 1, t 2 ] x e.A  [ t 2 ] x.snd e.A if [ t 1 ] x.fst e.A is empty struct { fst: [ t 1 ] x.fst e.A ; snd: [ t 2 ] x.snd e.A ; } empty if [ t ] x e.A is empty select [ t ] v e.A from v in x No searching (transitive closure) is needed for e.* { { [ t* ] x e.A 

Fegaras & Elmasri UTA 15 VLDB 2001 Search Engine for Web XML Files These are the XML documents stored in their native form at remote locations. For example, document(“*”).*.bib.*.author.*.name XML inverse indexes can be coded in ODL: struct word_spec { doc, level, location }; struct tag_spec { doc, level, ordinal, begin_loc, end_loc }; class XML_word ( key word extent word_index ) { attribute string word; attribute set occurs; }; class XML_tag ( key tag extent tag_index ) { attribute string tag; attribute set occurs; }; XML-OQL path expressions over web-accessible XML data can now be translated into OQL code over these indexes. document fragment

Fegaras & Elmasri UTA 16 VLDB 2001 Translating Web XML-OQL The path expression e.A is mapped to: select y.doc, y.level, y.begin_loc, y.end_loc from x in e, a in tag_index, y in a.occurs where a.tag=“A” and x.doc=y.doc and x.level+1=y.level and x.begin_loc<y.begin_loc and x.end_loc>y.end_loc A typical query optimizer will use the primary index of tag_index (a B + -tree) to find the elements with tag “A”. Much influenced by Niagara, but well integrated with the rest XML-OQL.

Fegaras & Elmasri UTA 17 VLDB 2001 You May Ask … Compositional semantics is fine for proving the soundness of rules, but is it effective for implementing high-performance systems? Why don’t you use a semi-structured algebra? OODBs are a dead beat now. Why don’t you use a relational database? OK, this framework looks fine for XML-OQL. What about “real” XML query languages, such as XQuery? What about DTDs and XML Schemas?

Fegaras & Elmasri UTA 18 VLDB 2001 Final Thoughts There are many benefits in storing and retrieving both XML and database data in the same system and language. There is common ground between XML Schema and ODL and between XQuery and OQL that we can take advantage of. OODB technology has a great potential for storing/retrieving XML data. Current status: we have built a prototype system on top of -DB (an ODMG-based OODBMS).