Give a query in XQuery to flip the nesting of data as shown below. That is, at

Question:

Give a query in XQuery to flip the nesting of data as shown below. That is, at the outermost level of nesting the outputmust have elements corresponding to authors, and each such element must have nested within it items corresponding to all the books written by the author.

EMP = (ename, setof (Children), setof (Skills))

Children = (name, Birthday)

Birthday = (day, month, year)

Skills = (type, setof (Exams))

Exams = (year, city)

Assume that attributes of type setof (Children), setof (Skills), and setof (Exams), have attribute names ChildrenSet, SkillsSet, and ExamsSet, respectively. Suppose the database contains a relation EMP (Emp).Write the following queries in SQL: 1999

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Database System Concepts

ISBN: 978-0072554816

4th Edition

Authors: Henry F. Korth, S. Sudarshan

Question Posted: