Database Programming for WWW
Database Programming for WWW INFS 740
Popular in Course
Popular in Science
This 5 page Class Notes was uploaded by Hazle Turcotte on Monday September 28, 2015. The Class Notes belongs to INFS 740 at George Mason University taught by Alexander Brodsky in Fall. Since its upload, it has received 69 views. For similar materials see /class/215081/infs-740-george-mason-university in Science at George Mason University.
Reviews for Database Programming for WWW
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/28/15
Sample Midterm Examination INFS 740 Database Programming for the WWW Prof A Brodsky Student ID Student Name Signature Under the honor code I will not discuss the content of this exam with any person who has not taken it INFS 740 Prof Brodsky Midterm Examination Provide all your answers in the space provided use back of pages if necessary You have 1 hour 45 minutes You MAY use any books or notes but NOT computers You are not allowed to receive help from any other person Be brief and neat in your answers Good luck Consider the following OrdersItem sPayments relational schema Orderid integercustomerName string customerNum integer ltemorderlD integerdescription stringcost real PaymentorderlD integerdueDate stringamount real Consider also the following hierarchical orders XML document ltorler id 17 gt ltcustomei39Namegt GMU ltcust0merNamegt ltcustometNumgt 12345 ltcustomerNumgt ltitemsgt lt1te1n descnpl ion notebook gt ltcostgt200ltcostgt ltitemgt ltitem lescnp on wl teboard gt ltcostgt 450ltcostgt lt1temgt ltitemsgt ltpa3m1entsgt ltpayment due l1001 gt ltamountgt 3000 ltamountgt ltpaymentgt ltpayment due 61001 gt ltamountgt 1700 ltamountgt ltordergt Problem 1 Write an XML schema to describe the hierarchical orders XML document above as accurately as possible Problem 2 Write an XML schema to describe the default XML representation of the relational tables above ie each relational table will be represented as an element and each raw in a table will be represented as an element etc Problem 3 Write an Xquery that given a hierarchical orders XML document will create the default XML representation of the relational tables representing the same information Problem 4 Write XQueries that given a hierarchical orders XML document a For every order creates an element total items with the number of items in that order b For every item of 50000 or more creates an element customers that lists all customer elements for those customers who have an order with that item c Find all customers who have an order with both the most expensive item ie no item is more expensive and the least expensive item ie no item is less expensive d Find all customers Whose balance is 1000 or more on 10152004 The balance for a customer is defined as the total price of ordered items minus all the payments that are due before 10152004
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'