XQuantum Database
An example of a regular type definition

return to query

Schema:
declare type Bib := element(bib, Book*);

declare type Book := element(book, (
    attribute(year, xs:integer),
    element(title, xs:string),
    (Author+ | Editor+),
    element(publisher, xs:string),
    element(price, xs:string))
);

declare type Author := element(author, (
     element(last, xs:string),
     element(first, xs:string))
);

declare type Editor := element(editor, (
     element(last, xs:string),
     element(first, xs:string),
     element(affiliation, xs:string))
);

declare type Reviews := element(reviews, Entry*);

declare type Entry := element(entry, (
    element(title, xs:string),
    element(price, xs:string),
    element(review, xs:string))
);

return to query