DOC PREVIEW
UCI ICS 184 - LECTURE NOTES

This preview shows page 1-2-3-23-24-25-26-47-48-49 out of 49 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 49 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 49 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 49 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 49 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 49 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 49 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 49 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 49 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 49 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 49 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 49 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

XMLSlide 2Why XML is of Interest to UsXML Data Sharing and ExchangeFrom HTML to XMLHTMLSlide 7Web ServicesXML TerminologyMore XML: AttributesMore XML: Oids and ReferencesXML Semantics: a Tree !XML DataRelational Data as XMLXML is Semi-structured DataSlide 16Slide 17Document Type Definitions DTDVery Simple DTDSlide 20DTD: The Content ModelDTD: Regular ExpressionsQuerying XML DataSample Data for QueriesData Model for XPathXPath: Simple ExpressionsXPath: Restricted Kleene ClosureXpath: Text NodesXpath: WildcardXpath: Attribute NodesXpath: PredicatesXpath: More PredicatesSlide 33Xpath: SummaryComments on XPath?XQueryFLWR (“Flower”) ExpressionsSlide 38Slide 39Slide 40XQuery: NestingSlide 42Slide 43Slide 44Slide 45Slide 46FOR v.s. LETSlide 48Collections in XQueryXMLXMLeXtensible Markup LanguageXML 1.0 – a recommendation from W3C, 1998Roots: SGML (a very nasty language).After the roots: a format for sharing dataWhy XML is of Interest to UsXML is just syntax for dataNote: we have no syntax for relational dataBut XML is not relational: semistructuredThis is exciting because:Can translate any data to XMLCan ship XML over the Web (HTTP)Can input XML into any applicationThus: data sharing and exchange on the WebXML Data Sharing and Exchangeapplicationrelational dataTransformIntegrateWarehouseXML Data WEB (HTTP)applicationapplicationlegacy dataobject-relationalSpecific data management tasksFrom HTML to XMLHTML describes the presentationHTML<h1> Bibliography </h1><p> <i> Foundations of Databases </i> Abiteboul, Hull, Vianu <br> Addison Wesley, 1995<p> <i> Data on the Web </i> Abiteoul, Buneman, Suciu <br> Morgan Kaufmann, 1999<h1> Bibliography </h1><p> <i> Foundations of Databases </i> Abiteboul, Hull, Vianu <br> Addison Wesley, 1995<p> <i> Data on the Web </i> Abiteoul, Buneman, Suciu <br> Morgan Kaufmann, 1999XML<bibliography> <book> <title> Foundations… </title> <author> Abiteboul </author> <author> Hull </author> <author> Vianu </author> <publisher> Addison Wesley </publisher> <year> 1995 </year> </book> …</bibliography><bibliography> <book> <title> Foundations… </title> <author> Abiteboul </author> <author> Hull </author> <author> Vianu </author> <publisher> Addison Wesley </publisher> <year> 1995 </year> </book> …</bibliography>XML describes the contentWeb ServicesA new paradigm for creating distributed applications?Systems communicate via messages, contracts.Example: order processing system.MS .NET, J2EE – some of the platformsXML – a part of the story; the data format.XML Terminologytags: book, title, author, …start tag: <book>, end tag: </book>elements: <book>…<book>,<author>…</author>elements are nestedempty element: <red></red> abbrv. <red/>an XML document: single root elementwell formed XML document: if it has matching tagsMore XML: Attributes<book price = “55” currency = “USD”> <title> Foundations of Databases </title> <author> Abiteboul </author> … <year> 1995 </year></book><book price = “55” currency = “USD”> <title> Foundations of Databases </title> <author> Abiteboul </author> … <year> 1995 </year></book>attributes are alternative ways to represent dataMore XML: Oids and References<person id=“o555”> <name> Jane </name> </person><person id=“o456”> <name> Mary </name> <children idref=“o123 o555”/></person><person id=“o123” mother=“o456”><name>John</name></person><person id=“o555”> <name> Jane </name> </person><person id=“o456”> <name> Mary </name> <children idref=“o123 o555”/></person><person id=“o123” mother=“o456”><name>John</name></person>oids and references in XML are just syntaxXML Semantics: a Tree !<data><person id=“o555” ><name> Mary </name><address><street> Maple </street> <no> 345 </no> <city> Seattle </city> </address></person><person><name> John </name><address> Thailand </address><phone> 23456 </phone></person></data><data><person id=“o555” ><name> Mary </name><address><street> Maple </street> <no> 345 </no> <city> Seattle </city> </address></person><person><name> John </name><address> Thailand </address><phone> 23456 </phone></person></data>dataMarypersonpersonnameaddressnameaddressstreet no cityMaple 345SeattleJohnThaiphone23456ido555ElementnodeTextnodeAttributenodeOrder matters !!!XML DataXML is self-describingSchema elements become part of the dataReational schema: persons(name,phone)In XML <persons>, <name>, <phone> are part of the data, and are repeated many timesConsequence: XML is much more flexibleXML = semistructured dataRelational Data as XML<person><row> <name>John</name> <phone> 3634</phone></row> <row> <name>Sue</name> <phone> 6343</phone> <row> <name>Dick</name> <phone> 6363</phone></row></person><person><row> <name>John</name> <phone> 3634</phone></row> <row> <name>Sue</name> <phone> 6343</phone> <row> <name>Dick</name> <phone> 6363</phone></row></person>n a m e p h o n eJ o h n 3 6 3 4S u e 6 3 4 3D i c k 6 3 6 3row row rowname name namephone phonephone“John” 3634 “Sue” “Dick”6343 6363personXML:personXML is Semi-structured DataMissing attributes:Could represent ina table with nulls <person> <name> John</name> <phone>1234</phone> </person><person> <name>Joe</name></person><person> <name> John</name> <phone>1234</phone> </person><person> <name>Joe</name></person> no phone !name phoneJohn 1234Joe -XML is Semi-structured DataRepeated attributesImpossible in tables:<person> <name> Mary</name> <phone>2345</phone> <phone>3456</phone></person><person> <name> Mary</name> <phone>2345</phone> <phone>3456</phone></person> two phones !name phoneMary 2345 3456???XML is Semi-structured DataAttributes with different types in different objectsNested collections (no 1NF)Heterogeneous collections:<db> contains both <book>s and <publisher>s<person> <name> <first> John </first> <last> Smith </last> </name> <phone>1234</phone></person><person> <name> <first> John </first> <last> Smith </last>


View Full Document

UCI ICS 184 - LECTURE NOTES

Download LECTURE NOTES
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 LECTURE NOTES 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 LECTURE NOTES 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?