Database Reference
In-Depth Information
XRX ARCHITECTURE
In addition to the other uses just mentioned, XML databases are central to what is termed an “XRX
Web Application Architecture,” which has grown in popularity in recent years. This architecture is called
“symmetrical” or sometimes “zero-translation” because it uses XML in every tier of an application.
“XRX” stands for XForms, REST, and XQuery.
On the client side, XRX uses XForms, which is a W3C-recommendation XML format distinct from
HTML forms; XForms is capable of expressing the kinds of controls required in forms, but it does not
dictate the final presentation form. That is, XForms can be rendered in web pages, but also in other ap-
plications, such as Open Office and Lotus documents. It accomplishes this flexibility by using a Model
View Controller (MVC) design, which allows advanced features such as form validation against an XML
schema document, and in-page data refreshes. Currently, no browser natively supports XForms, though
plug-ins are available for Firefox, and libraries exist to allow server-side translation of XForms into
XHTML.
In the middle tier, XRX uses RESTful services, sometimes only as a facade around the database; on
the backend, XRX employs a native XML database to store and query documents using XQuery, and
frequently these databases expose a RESTful interface.
XML databases have proven useful in part because they allow developers to work with XML
using specifications aimed at XML documents. Working directly with XML in the data tier can
be a relief to developers facing the notorious “impedance mismatch” between object-oriented
application languages and relational databases.
XML databases have one core function: to allow you to store and query XML documents. Al-
though they are often not stored directly in their “native” format, developers can work with the
documents using APIs as if they were. These include:
▪ Use of XML-friendly query mechanisms such as XPath and XQuery. XPath is the mech-
anism to address the variety of data items in a document, such as elements and attributes.
XQuery affords a robust querying mechanism in the form of FLOWR queries (so named
because they allow you to use statements such as “For”, “Let”, “Where”, “Order,” and
“Return”).
▪ Performance improvements when you're using XML directly within your application. Some
applications that work with XML will map these documents to a relational database, but
there are a variety of advantages to skipping this step and using an XML database instead.
For example, XML documents typically represent hierarchical data structures, which may
map poorly to a relational model.
▪ Flexibility for accessing your data. XML databases frequently allow you to work with data
in DOM, JDOM, SAX APIs, and SOAP. Each of these has its own strengths, and you're not
limited to the single query mechanism of SQL.
Search WWH ::




Custom Search