Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

17 Pages

lecture14

Course: CS 444, Fall 2009
School: Washington
Rating:

Word Count: 493

Document Preview

Lecture 14: Relational Algebra Projects XML? February 7th, 2003 Relational 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 Dependents Semijoins in Distributed Databases...

Register Now

Unformatted Document Excerpt

Coursehero >> Washington >> Washington >> CS 444

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Lecture 14: Relational Algebra Projects XML? February 7th, 2003 Relational 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 Dependents Semijoins in Distributed Databases Semijoins are used in distributed databases Dependents Employee SSN ... Name ... SSN Dname Age ... ... network Employee ssn=ssn ( R = Employee T age&gt;71 (Dependents)) age&gt;71 T = SSN (Dependents) Answer = R Dependents Complex RA Expressions name buyer-ssn=ssn pid=pid seller-ssn=ssn ssn name=fred Person Purchase Person pid name=gizmo Product Operations on Bags A bag = a set with repeated elements All 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 elimination Important ! Relational Engines work on bags, not sets ! Reading assignment: 5.3 5.4 Transitive Closure Can we compute &quot;transitive closure&quot;? Name1 Fred Mary Mary Nancy Name2 Mary Joe Bill Lou Relationship Father Cousin Spouse Sister Find all direct and indirect relatives of Fred XML XML <a href="/keyword/extensible-markup-language/" ><a href="/keyword/extensible-markup/" >extensible markup</a> language</a> XML 1.0 a recommendation from W3C, 1998 Roots: SGML (a very nasty language). After the roots: a format for sharing data Why 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 Web XML Data Sharing and Exchange application object-relational application XML Data Transform Integrate WEB (HTTP) Warehouse application relational data legacy data Specific data management tasks From HTML to XML HTML describes the presentation HTML &lt;h1&gt; Bibliography &lt;/h1&gt; &lt;p&gt; &lt;i&gt; Foundations of Databases &lt;/i&gt; Abiteboul, Hull, Vianu &lt;br&gt; Addison Wesley, 1995 &lt;p&gt; &lt;i&gt; Data on the Web &lt;/i&gt; Abiteoul, Buneman, Suciu &lt;br&gt; Morgan Kaufmann, 1999 XML &lt;bibliography&gt; &lt;book&gt; &lt;title&gt; Foundations... &lt;/title&gt; &lt;author&gt; Abiteboul &lt;/author&gt; &lt;author&gt; Hull &lt;/author&gt; &lt;author&gt; Vianu &lt;/author&gt; &lt;publisher&gt; Addison Wesley &lt;/publisher&gt; &lt;year&gt; 1995 &lt;/year&gt; &lt;/book&gt; ... &lt;/bibliography&gt; XML describes the content XML Terminology tags: book, title, author, ... start tag: &lt;book&gt;, end tag: &lt;/book&gt; elements: &lt;book&gt;...&lt;book&gt;,&lt;author&gt;...&lt;/author&gt; elements are nested empty element: &lt;red&gt;&lt;/red&gt; abbrv. &lt;red/&gt; an XML document: single root element well formed XML document: if it has matching tags More XML: Attributes &am...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Washington - CS - 444
Lecture 15: XMLFebruary 10th, 2003Agenda for Quarter Done: SQL, views, transactions, conceptual modeling, E/R, relational algebra. Starting: XML To do: the database engine: Storage Query execution Query optimization Data integrationXML
Washington - CS - 444
Querying XMLFebruary 12th, 2003Querying XML Data XPath = simple navigation through the tree XQuery = the SQL of XML XSLT = recursive traversal will not discuss in classSample Data for Queries&lt;bib&gt; &lt;book&gt; &lt;publisher&gt; Addison-Wesley &lt;/publish
Washington - CS - 444
Web ServicesFebruary 14th, 2003Outline Overview of web services Create a web service with MS .Net Requirements for project Phase IIWhat is a Web Service A web service is a network accessible interface to application functionality, built usin
Washington - CS - 444
End of XMLFebruary 19th, 2003FLWR (Flower) ExpressionsFOR . LET. WHERE. RETURN.XQueryFind book titles by the coauthors of Database Theory:FOR \$x IN bib/book[title/text() = Database Theory]/author \$y IN bib/book[author/text() = \$x/text()]/titl
Washington - CS - 444
DMBS Internals IFebruary 24th, 2003What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently and safely. Provide durability of the data. How will we do all this?
Washington - CS - 444
Storage and IndexingFebruary 26th, 2003 Lecture 19Storage and Indexing How do we store efficiently large amounts of data? The appropriate storage depends on what kind of accesses we expect to have to the data. We consider: primary storage of t
Washington - CS - 444
IndexingFebruary 28th, 2003 Lecture 20Review What is index? Compare with primary key Why do we need index? Alternative for data entry k* in index? Data record with key value k &lt;k, rid of data record with search key value k&gt; &lt;k, list of rid
Washington - CS - 444
Query Execution3/3/3Where are we? File organizations: sorted, hashed, heaps. Indexes: hash index, B+-tree Indexes can be clustered or not. Data can be stored in the index or not. Hence, when we access a relation, we can either scan or go thr
Washington - CS - 444
Query OptimizationMarch 7th, 2003Query Optimization Process (simplified a bit) Parse the SQL query into a logical tree: identify distinct blocks (corresponding to nested subqueries or views). Query rewrite phase: apply algebraic transformatio
Washington - CS - 444
Query OptimizationMarch 10th, 2003Very Big Picture A query execution plan is a program. There are many of them. The optimizer is trying to chose a good one. Hence, the optimizer is reasoning about programs. Key: cost model, search space. Com
Washington - CS - 444
Query Optimization and PerspectivesMarch 12th, 2003Administration Exam next Wednesday, 2:30pm. Special office hours next week will be announced.Problem Given: a query R1 R2 Rn Assume we have a function cost() that gives us the cost of every
Washington - CS - 444
Computer Science &amp; Engineering 444 Final Exam June 10, 2002 Closed book &amp; notes 120 minutes 100 points total Name: _ StuID: _ Part 1 2 3 4 TotalScore
Washington - CS - 444
1. a) &lt;wnyc&gt; &lt;piece id = &quot;3&quot;&gt; &lt;time&gt;1:01&lt;/time&gt; &lt;title&gt;Mad Rush&lt;/title&gt; &lt;composer&gt;J.Sibelius&lt;/composer&gt; &lt;conductor&gt;L.Bernstein&lt;/conductor&gt; &lt;soloist&gt;A.Karis&lt;/soloist&gt; &lt;/piece&gt; &lt;piece id = &quot;4&quot;&gt; &lt;time&gt;1:47&lt;/time&gt; &lt;title&gt;Andante&lt;/title&gt; &lt;composer&gt;L.Beeth
Washington - CSE - 444
Computer Science &amp; Engineering 444 Midterm May 8, 2002 Close book &amp; notes 50 minutes 100 points total Name: _ StuID: _ 1. [25 points] a. [20 points] Cre
Washington - CSE - 444
1. a) Employees (EmployID, Lot) Hourly_Emps (EmployID, Hours_worked, Hours_wages) Contract_Emps (EmployID, ContractID) or ContractID as the key Company (DeptID, Name, Budget, CEOEmployID, Since) Or Company (DeptID, Name, Budget, CEOContractID, Since)
Washington - CSEP - 531
CSEP 590TU Sample Final Questions1. For each of the following questions answer true or false and JUSTIFY your answer. (a) If L is Turing recognizable then there is a Turing machine that generates L in lexicographic order. (b) If A is N P-complete an
Washington - CSEP - 531
Computational ComplexityClassify problems according to the amount of computational resources used by the best algorithms that solve them Recall:worst-case running time of an algorithm max # steps algorithm takes on any input of size n TIME(f
Washington - CS - 551
CSE 551Design Exercise #1 A Virtual Machine Monitor for the Internet First draft due: noon, Thursday, April 9, 2009 Final draft: 4:30pm, Thursday, April 16, 2009 An operating system, such as UNIX, provides several key pieces of functionality for its
Washington - CS - 551
Design Exercise #2 File Systems on Phase Change Memory First draft due: noon, Thursday, April 30, 2009 Final draft: 4:30pm, Thursday, May 7, 2009 The widespread deployment of lightweight portable devices has led to increasing interest in hardware tec
Washington - CS - 551
CSE 551Design Exercise #3 Robust, Highly Available Web Service First draft due: noon, Thursday, May 14, 2009 Final draft: 4:30pm, Thursday, May 21, 2009 In class, we have discussed various mechanisms to achieve robustness and high availability, such
Washington - CS - 551
CSE 551Problem Set #1 Due: 4:30pm, Thursday, June 4, 2009 1. Write pseudo-code in Java, Python, C+ or C, to implement reader-writer locks (covered in class), with strict FIFO queueing (readers can enter if no earlier writer is waiting; writers can e
Washington - CS - 373
CSE 373: Data Structures and Algorithms Course Information and SyllabusWinter 2007Logistics and Contact Information: See the course homepage for information about the course schedule, staff, office hours, mailing lists, discussion boards, etc.: www
Washington - CS - 373
CSE 373 Midterm 11/30/06Name _ Do not write your id number or any other confidential information on this page.There are 8 questions worth a total of 70 points. Please budget your time so you get to all of the questions, particularly some of the
Washington - CS - 373
CSE 373 Midterm 11/30/06Sample SolutionQuestion 1. (10 points) (a) Define what it means to say that a function f(n) is O(g(n). (i.e., give the mathematical definition as described in lecture and in the textbook.) Function f(n) is O(g(n) if ther
Washington - CS - 373
CSE 373 Midterm 22/27/06Name _ Do not write your id number or any other confidential information on this page.There are 8 questions worth a total of 60 points. Please budget your time so you get to all of the questions, particularly some of the
Washington - CS - 373
CSE 373 Midterm 22/27/06 Sample SolutionQuestion 1. (6 points) (a) What is the load factor of a hash table? (Give a definition.) The load factor is number of items in the table / size of the table (number of buckets)(b) What is a reasonable val
Washington - CS - 373
CSE 373 Final Exam3/14/06Name _ Do not write your id number or any other confidential information on this page.There are 10 questions worth a total of 92 points. Please budget your time so you get to all of the questions, particularly some of t
Washington - CS - 373
CSE 373 Final Exam3/14/06 Sample SolutionQuestion 1. (6 points) A priority queue is a data structure that supports storing a set of values, each of which has an associated key. Each key-value pair is an entry in the priority queue. The basic oper
Washington - CS - 373
Staff InstructorIntroductionCSE 373 Data Structures Winter 2007&gt; Hal Perkins (perkins at cs.washington.edu) TA&gt; Tian Sang (sang at cs.washington.edu) Email is particularly good for short questions, setting up appointments, topics not suitab
Washington - CS - 373
Mathematical Background Today, we will review:Mathematical BackgroundCSE 373 Data Structures&gt; &gt; &gt; &gt;Logs and exponents Series Recursion Motivation for Algorithm Analysis5 January 2007CSE 373 - Math Background2Powers of 2 Many of the n
Washington - CS - 373
AgendaCollections &amp; ImplementaitonsInterfaces, Classes, Iterators, JavaDoc, and Testing CSE 373 Data Structures Winter 2007 Review of containers (ADTs) and implementations Running example list collection with two implementations: arrays and link