Document information
- University
- Politecnico di Milano
- Degree programme
- Computer Engineering
- Subject
- Data Bases 2
- Classification
- Exercises · By topic
- Original format
- Text
- Searchable text
Topic-based study materials for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: This is a selection of XML exercises assigned in the Databases 2 course 2015 2015/09/30 - STOCK EXCANGE - (10 p.) <!ELEMENT Log ( Day+ )> <!ELEMENT Day ( Date, Order* )> <!ELEMENT Order ( CusId, StockCode, OrderTimestamp, TargetPrice, Qty )> <!ATTLIST Order Type ( sell | buy )
Topic-based study materials for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: This is a selection of XML exercises assigned in the Databases 2 course 2015 2015/09/30 - STOCK EXCANGE - (10 p.) <!ELEMENT Log ( Day+ )> <!ELEMENT Day ( Date, Order* )> <!ELEMENT Order ( CusId, StockCode, OrderTimestamp, TargetPrice, Qty )> <!ATTLIST Order Type ( sell | buy )
Import quality: text was extracted directly from the original document.
Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.
This is a selection of XML exercises assigned in the Databases 2 course 2015 2015/09/30 - STOCK EXCANGE - (10 p.) <!ELEMENT Log ( Day+ )> <!ELEMENT Day ( Date, Order* )> <!ELEMENT Order ( CusId, StockCode, OrderTimestamp, TargetPrice, Qty )> <!ATTLIST Order Type ( sell | buy ) #REQUIRED executed (y|n) #REQUIRED ExecTimestamp CDATA #IMPLIED executionPrice CDATA #IMPLIED > The DTD above describes th e log of all orders managed by an e-trading platform, with information about the execution (some orders meet their target price and are executed, other orders remain unexecuted and expire at the end of the day). Days are in chronological order in the document. Unspecified elements only contain PCData. Extract in XQuery: 1. The single order executed for the largest amount of money ever. (3 p.) 2. For each stock, the percentage of executed orders w.r.t. the number of submitted orders for that stock. (4 p.) 3. The customers, if any, who tried to sell the same stock in two consecutive days, but did not succeed. (3 p.) 2015/09/07 – MIRKWOOD MUSHROOM HUNT - (10 p.) <!ELEMENT AMMH_Hall_Of_Fame ( Edition+ )> <!ELEMENT Edition ( Year, Participants+, PrizesDescription )> <!ELEMENT Participant ( Name, City, Mushroom* )> <!ELEMENT Mushroom ( Type, Weight, PoisonousFlag )> The DTD above describes data collected along the many editions of the Annual Mirkwood Mushroom Hunt, when hunters are challenged to hunt the largest number of spectacular mushrooms to get amazing prizes. Unspecified elements only contain PCData. Extract in XQuery: 1. The name of the participants (if any) that took part in all editions of the Hunt. (3p) 2. The name of the participant who found the heaviest non-poisonous mushroom ever. (3p) 3. For each edition and each mushroom type, the overall number of mushrooms of…
First page of the document.