question archive 1) The document "jazz

1) The document "jazz

Subject:Computer SciencePrice: Bought3

1) The document "jazz.xml" is stored in Oracle XML repository in the folder "/public/exam".

<?xml version= "1.0" ?> <collection>

<CD cid = "123">

<title> Kind of Blue</title> <musician> Miles Davis </musician> <songs>

<track>So What </track>

<duration> 5 </duration> </songs>

</CD>

<CD cid = "234" >

<title> Blue Train</title>

<musician> John Coltrane </musician> <songs>

<track>Blue Train </track>

<duration> 7 </duration> </songs>

</CD> </collection>

Using Xquery language, formulate queries which return:

a) [4] duration of the song form CD with cid= "123"

b) [3] musician who performed the song longer than 6 min

2. Using the following object relational schema:

create type feature as object (genre varchar2(10), form varchar2(20)); /

create type movie_t as object (id char(3), title varchar2(15),

pyear number (4), duration number(1), mf feature,

map member function dur_min return number); /

create type actor_t as object (aid char(3), first varchar2(15), last varchar2(20), Y_of_B number(4),

member function age(cyear in number) return number); /

create or replace type stars_t as object

(rid char(3), movie ref movie_t, actor ref actor_t);

/

create table movie of movie_t (id primary key); create table actor of actor_t(aid primary key); create table stars of stars_t (rid primary key);

Formulate the queries returning the following XML data:

  1. a) [3]
  2. <movie mid= "123"> <title>Star Wars </title>
  3. <prod_year> 2005</prod_year>
  4. <genre> Fiction</genre> </movie>
  5. <movie mid= "234">
  6. <title>The Devil Wears Prada </title> <prod_year> 2006</prod_year> <genre>Comedy</genre>
  7. </movie>
  8. b) [5]

<works> <starring>

<actor>

<first> Natalie</first>

<last>Portman </last> </actor>

<movie> Star Wars </movie> </starring>

<starring> <actor>

<first> Maryl</first>

<last>Streep </last> </actor>

<movie> The Devil Wears Prada </movie> </starring>

</works> 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE