Re: XQuery and music information retrieval

Hello Mugur,

Thanks for the suggestions. I am intrigued by the basic idea of string comparison function subseq, but a little unclear on how this works out. In your example of:

for $p in //part
let $z := (<note>C</note>,<note>D</note>,<note>E</note>,<note>C</note>)
where subseq($z, $p/note)
return $p/note

Could you please elaborate on this a little more to someone who knows XML much more than query languages? What is $p/note here? All the notes within part p? We want to return all the matches within a part, not just the first one. So if the function subseq returned an index based on the string comparison, how would we write this function to return all the notes within each part that start the sequence?

This must be simple XQuery but I don't quite understand yet how all the parts fit together yet. Once I have a full example to work with I should be off and running.

The next question is how fast might we expect this to be in an XML database? A part can easily contain thousands of notes. We want to have queries that can take advantage of database optimizations as much as possible, since the example I gave is really simplified compared to what really needs to be done to retrieve a melody.

Thanks again,

Michael Good
Recordare

Received on Saturday, 21 July 2001 00:30:57 UTC