DOC PREVIEW
Berkeley COMPSCI 186 - Querying XML

This preview shows page 1-2-3-4-29-30-31-32-59-60-61-62 out of 62 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 62 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PowerPoint PresentationOutline of the PresentationA little bit of historyWhat is XML?XML Data Example (1)XML Data Example (2)XML vs. relational dataThe secrets of the XML successXML as a family of technologiesMajor application domains for XMLXML query languageBrief history of XML query languagesGeneral Xquery requirementsXML: Many EnvironmentsXquery in a nutshellXquery type systemXML Data ModelSlide 18SequencesAtomic valuesXML nodesExample of well formed XML dataXML schema exampleSchema validated XML dataXML queriesXquery expressionsConstantsVariablesA built-in function samplerConstructing sequencesCombining sequencesArithmetic expressionsAtomizationLogical expressionsComparisonsValue and general comparisonsConditional expressionsXPath expressionsXpath expressionsExamples of path expressionsXpath abbreviated syntaxXpath filter predicatesSimple iteration expressionLocal variable declarationFLWR expressionsFLWR expression semanticsMore FLWR expression examplesQuantified expressionsNode constructorsLiteral vs. evaluated element contentOperators on datatypesComplex Xquery exampleXSLT-like transformationsJoins in XQueryLeft-outer joins in XQueryFull-outer joins in XqueryGroup-by and HavingContent exchangerXML query language summaryConclusionSlide 61Slide 62T H E 8 T H A N N U A L B E A T E C H N O L O G Y C O N F E R E N C EDaniela FlorescuBEA [email protected] XML2Outline of the Presentation•What is XML?•XML query language : the big picture•XML data model•XML expressions •Complex Xquery examples•Conclusions3A little bit of history•Database world•1970 relational databases•1990 nested relational model and object oriented databases•1995 semi-structured databases•Document world•1974 SGML (Structured Generalized Markup Language)•1990 HTML (Hypertext Markup Language)•1992 URL (Universal Resource Locator)•Data + documents = information•1996 XML (Extended Markup Language)•URI (Universal Resource Identifier)4What is XML?•The Extensible Markup Language (XML) is the universal format for structured documents and data on the Web. •Base specifications:•XML 1.0, W3C Recommendation Feb '98•Namespaces, W3C Recommendation Jan '995 XML Data Example (1)<book year=“1967”> <title>The politics of experience</title> <author><firstname>Ronald</firstname><lastname>Laing</lastname> </author></book>Elements • Elements and attributes• Tree-based, nested, hierarchically organized structure6XML Data Example (2)<book year=“1967” xmlns:amz=“www.amazon.com”> <title>The politics of experience</title> <author>R.D. Laing</author> <amz:ref amz:isbn=“1341-1444-555”/> <section> The great and true Amphibian, whose nature is disposed to….. <title>Persons and experience</title> Even facts become... </section> …</book>• Qualified names• Namespaces• Mixed content7XML vs. relational data•Relational data•First killer application: banking industry•Invented as a mathematically clean abstract data model•Philosophy: schema first, then data •Never had a standard syntax for data•Strict rules for data normalization, flat tables•Order is irrelevant, textual data supported but not primary goal•XML•First killer application: publishing industry •Invented as a syntax for data, only later an abstract data model•Philosophy: data and schemas should be decorrelated, data can exist with or without schema, or with multiple schemas•No data normalization, flexibility is a must, nesting is good•Order may be very important, textual data support a primary goal8The secrets of the XML success•XML is a general data representation format •XML is human readable•XML is machine readable•XML is internationalized (UNICODE)•XML is platform independent•XML is vendor independent•XML is endorsed by the World Wide web Consortium (W3C)•XML is not a new technology•XML is not only a data representation format9XML as a family of technologies•XML Information Set •XML Schema•XML Query•The Extensible Stylesheet Transformation Language (XSLT)•XML Forms•XML Protocol•XML Encryption •XML Signature•Others•… almost all the pieces needed for a good Web Services puzzle…10Major application domains for XML•Data exchange on the Web•e.g.HealthCare Level Seven http://www.hl7.org/•Application integration on the Web•e.g. ebXML http://www.ebxml.org/•Document exchange on the Web•e.g. Encoded Archival Description Application http://lcweb.loc.gov/ead/11XML query language •Why a query language for XML ?•Preserve logical/physical data independence–The semantics is described in terms of an abstract data model, independent of the physical data storage•Declarative programming–Such programs should describe the “what”, not the “how”•Why a native query language ? Why not SQL ?•We need to deal with the specificities of XML (hierarchical, ordered , textual, potentially schema-less structure)12Brief history of XML query languages•Research •1995-1997 Semi-structured query languages (e.g. UnQL, Lorel, StruQL, YATL)•1997-1998 XML query languages (e.g.XML-QL, XML-GL)•Industry•1997 Xpath 1.0•1998 XSLT •1999 Creation of a standardization group inside the W3C XQuery13General Xquery requirements•Non-procedural, declarative query language •Human readable syntax •Protocol independent •Standard error conditions •Should not preclude updates14XML: Many EnvironmentsDOMSAXDBMSXMLJavaCOBOLDOMSAXDBMSXMLJavaCOBOLXQueryW3C XML Query Data ModelW3C XML Query Data Model15Xquery in a nutshell•Side effect free, functional language •A query is a prologue + an expression to evaluate•Expressions are compiled and evaluated in an environment populated by the query prologue•The result of the query is the result of the evaluation of the expression•Strongly typed •Every expression has a type•Statically typed •The type of the result of an expression can be detected statically•Formal semantics based on XML Abstract Data Model16Xquery type system •Xquery’s has a powerful (yet complex!) type system•Xquery types are imported from XML Schemas•The type system can:1. detect statically errors in the queries2. infer the type of the result of valid queries3. ensure statically that the result of a given query is of a given (expected) type if the input dataset is guaranteed to be of a given type17XML Data Model•Common for Xpath 2.0 and XQuery 1.0 •Same goal as the


View Full Document

Berkeley COMPSCI 186 - Querying XML

Documents in this Course
Load more
Download Querying XML
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Querying XML and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Querying XML 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?