Essay
State the underlying type of the following expressions:
(a) let $a := 1 + 2 return $a + $a
(b) let $a := 1e0 + 1.0 return $a + $a
(c) let $a as xs:integer := 1 + 2 return $a + $a
(d) let $a as xs:decimal := 1 + 2 return $a + $a
(e) let $a as xs:double := 1 + 2 return $a + $a
(f) let $a := xs:double(1 + 2) return $a + $a
(g) let $a as xs:double := xs:double (1 + 2) return $a + $a
(h) let $a as xs:decimal := 1, $b as xs:integer := $a + $a return $b + $b
(i) if ($a < $b) then 3 else 4 (assume $a and $b are xs:integer)
(j) if ($a < $b) then "abc" else 4.00 (assume $a and $b are xs:integer)
(k) if ($a < $b) then 3.6e1 else 4 (assume $a and $b are xs:integer)
(l) (if ($a < $b) then 3.6e1 else 4) + 0.5 (assume $a and $b are xs:integer)
Correct Answer:

Verified
(a) xs:integer (1 + 2 has type xs:intege...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q1: Explain why businesses have shown a growing
Q2: State the underlying type of the following
Q3: 'A data warehouse is a subject-oriented, integrated,
Q4: Explain why businesses have shown a growing
Q6: The World Wide Web is a distributed
Q7: Discuss the major problems associated with the
Q8: The main characteristics for describing Online Transaction
Q9: Discuss the relationship between online transaction processing
Q10: 'Data warehouse and the underlying support for
Q11: "A subject-oriented, integrated, time-variant, and non-volatile collection