ADS Assignment-2 KV22E

.pdf

School

Florida State University *

*We aren’t endorsed by this school

Course

728 D

Subject

Computer Science

Date

Oct 30, 2023

Type

pdf

Pages

13

Uploaded by faisalmd929

Report
ADS ASSIGNMENT -2 KEERTHI REDDY VUDEM KV22E 1. FLWOR expression which outputs a list of countries having islands. Output Country name and island name. Query: for $island in doc("world.xml")/mondial/island let $country := doc("world.xml")/mondial/country[@id = $island/located/@country] where $country return concat($country/@name, ': ', $island/@name) Output:
2. FLWOR expression which outputs the average population for cities in Croatia. Query: let $cities := doc("world.xml")/mondial//country[@name='United States']//city return avg($cities/population) Output: 3. FLWOR Expression which outputs the names and population of the countries with population less than 1 million and also has gdp_total less than 10000. Query: doc("/home/world.xml")/mondial/country[@population < 1000000 and @gdp_total < 10000]/concat(@name, ":", @population) Output:
4. FLWOR expression which outputs Provinces and their Capitals in United States. Output Province Name and Capital Name. Query: for $province in doc("world.xml")/mondial/country[@name='United States']/province let $capital-id := $province/@capital let $capital-name := $province/city[@id=$capital-id]/name return concat('Province:', $province/@name, ' Capital:', normalize-space(string- join($capital-name, ', ')))
Output:
5. FLWOR expression which outputs a list of capitals of countries, where national inflation is between including 2 and 4 and the government of these countries has the word ‘democracy’. Output Country name, Country Inflation and Country government. Query: for $country in doc("world.xml")/mondial/country, $capital-city in $country//city where $capital-city/@id = $country/@capital and $country/@inflation >= 2 and $country/@inflation <= 4 and contains($country/@government, "democracy") return <result country="{$country/@name}" inflation="{$country/@inflation}" government="{$country/@government}" capital="{normalize-space(data($capital-city/name))}"> </result> Output: 6. XPath that returns cities and its population in Sweden located nearby lakes and having population less than 40000.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: what is meant by inflation? If you see a rise in the price of gasoline, is that inflation? Is that…
Q: The roller-coaster car shown below (h₁ = 31 m, h3 = 28 m, h4 = 10 m), is dragged up to point 1 where…
Q: Using the Tukey HSD test: what is the HSD for group 1 (ore dock) vs. group 2 (black rocks) ? What is…
Q: For the matrix, list the real eigenvalues, repeated according to their multiplicities. 70 0 1 7 0 0…
Q: Pisa Company acquired 75 percent of Siena Company on January 1, 20X3, for $712,500. The fair value…
Q: sensitive clay: Density, p = 1280 kg/m³ Density of soil solids, p. = 2750 kg/m³ Void ratio, e = 9.0…
Q: Enter the equation of the parabola graphed below, using the vertex form y = a (x-h)² + k -5 -4 -3 -1
Q: Consider the beam shown in (Figure 1). The support at B can be assumed to be a roller. Suppose that…
Q: For a PN junction, the I-V relationship is described by eV I = I, exp kT Please sketch the I-V plot,…
Q: A stock had a return of 6.8 percent last year. If the inflation rate was 1.2 percent, what was the…
Q: Stephanie is trying to employ the normative decision model to assist in making leadership decisions.…
Q: 2) y" + 4y' + 5y = 3e-2t, y(0) = 4, y'(0) = –7
Q: Prepare a journal entry on December 23 for the withdrawal of $22,500 by Graeme Schneider for…
Q: 15. Name 4 factors that that increase venous return (return of blood from the veins to the right…
Q: 12 and y = - 6 Find the distance between x = 8 The distance between x and y is (Type an exact…
Q: Saturated mixture of water is at a pressure of 4000 kPa. If the quality of the mixture is x= 0.75,…
Q: b) A thin layer of water flows down along the surface of a hill. The water is exposed to the…
Q: Find the vector x determined by the given coordinate vector [x]g and the given basis B. 4 4. -3 B=…
Q: Rank the following three single taxpayers in order of the magnitude of taxable income. Assume none…
Q: Find values of m and b such that: f(x)=x2+1          if x=1 is differentiable.
Q: For the reaction aA(aq) + bB(1) cC(g) + dD(aq) the equilibrium constant, K, can be written as Pc…
Q: A wheel has an angular speed of 49 rev/s when it experiences a constant angular acceleration of 69…