DOC PREVIEW
UW CSE 444 - Relational Algebra Projects XML

This preview shows page 1-2-3-4-5-6 out of 17 pages.

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

Unformatted text preview:

Lecture 14: Relational Algebra Projects XML?Relational AlgebraSemijoinSemijoins in Distributed DatabasesComplex RA ExpressionsOperations on BagsTransitive ClosureXMLSlide 9Why XML is of Interest to UsXML Data Sharing and ExchangeFrom HTML to XMLHTMLSlide 14XML TerminologyMore XML: AttributesMore XML: Oids and ReferencesLecture 14:Relational AlgebraProjectsXML?February 7th, 2003Relational Algebra•Five operators:–Union: –Difference: -–Selection:–Projection:  –Cartesian Product: •Derived or auxiliary operators:–Intersection, complement–Joins:•Natural join•Theta join•Equi-join•Semi-join –Renaming:Semijoin•R ⋉ S =  A1,…,An (R ⋈ S)•Where A1, …, An are the attributes in R•Example:–Employee ⋉ DependentsSemijoins in Distributed Databases•Semijoins are used in distributed databasesSSN Name. . . . . .SSN Dname Age. . . . . .EmployeeDependentsnetworkEmployee ⋈ssn=ssn (age>71 (Dependents))Employee ⋈ssn=ssn (age>71 (Dependents))T =  SSN age>71 (Dependents)R = Employee T⋉Answer = R ⋈ DependentsComplex RA Expressions Person Purchase Person Productname=fredname=gizmo pid ssnseller-ssn=ssnpid=pidbuyer-ssn=ssn nameOperations on BagsA bag = a set with repeated elementsAll operations need to be defined carefully on bags•{a,b,b,c}{a,b,b,b,e,f,f}={a,a,b,b,b,b,b,c,e,f,f}•{a,b,b,b,c,c} – {b,c,c,c,d} = {a,b,b,d}• C(R): preserves the number of occurrences• A(R): no duplicate elimination•Cartesian product, join: no duplicate eliminationImportant ! Relational Engines work on bags, not sets !Reading assignment: 5.3 – 5.4Transitive Closure•Can we compute “transitive closure”?•Find all direct and indirect relatives of FredName1 Name2 RelationshipFred Mary FatherMary Joe CousinMary Bill SpouseNancy Lou SisterXMLXML•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 contentXML 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


View Full Document

UW CSE 444 - Relational Algebra Projects XML

Documents in this Course
XML

XML

48 pages

SQL

SQL

25 pages

SQL

SQL

42 pages

Recovery

Recovery

30 pages

SQL

SQL

36 pages

Indexes

Indexes

35 pages

Security

Security

36 pages

Wrap-up

Wrap-up

6 pages

SQL

SQL

37 pages

More SQL

More SQL

48 pages

SQL

SQL

35 pages

XML

XML

46 pages

Triggers

Triggers

26 pages

Load more
Download Relational Algebra Projects 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 Relational Algebra Projects 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 Relational Algebra Projects 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?