Databases Reference
In-Depth Information
and efficient to update
XML
documents. The larger the
XML
documents are, the
more critical it is to use the update function.
The
W3C
standardized XQuery updates in 2011. The other XQuery specification
that was released by the
W3C
in 2011 was the full-text extension, which we'll cover next.
5.2.6
XQuery full-text search standards
Native
XML
systems are used to store both business documents like sales orders and
invoices, and written documents like articles or books. Because native
XML
databases
are used to store large amounts of textual information, there's a strong demand for
high-quality search of these documents. Fortunately, the
W3C
has also created
XQuery-based standards for full-text search.
XQuery supports a search extension module that standardizes how search func-
tions are performed on a full-text database (a database that contains a complete text
of the topics, journals, magazines, newspapers, or other kinds of textual material in a
collection). This extension to the XQuery language specifies how search queries
should be specified in terms of XQuery functions
Search standards are important because they allow your XQuery search applica-
tions to be portable to multiple native
XML
databases. In addition, using standards in
full-text search code and processes allows staff to port their knowledge from one
XML
database to another, reducing training and application development time.
The specification also provides guidelines on advanced functions such as Boolean
and nearness operations. The key difference is that with native
XML
databases, each
node can be considered its own document and have its own indexing rules. This
allows you to set up rules to weight matches in the title of a document above matches
in the body of a document. We'll review the concepts of search and weighting in
greater detail in chapter 7.
We've now reviewed how to build a web application using a native
XML
database.
You've seen how data is loaded, transformed, updated, and searched using XQuery
and XQuery extensions. Now let's take a look at other standards used in native
XML
databases that allow you to build portable applications.
5.3
Using XML standards within native XML databases
XML
standards allow you to reuse your knowledge and code as you move from one
native
XML
database to another. They also allow you to keep your NoSQL applications
portable across different implementations of NoSQL databases and prevent vendor
lock-in. Standards make it easier to learn a new NoSQL system, which helps you and
your team get your products to market faster. If you're already familiar with an
API
or
data standard, your application development using that standard will be faster with
each subsequent project.
Let's begin with an overview of some of the
XML
standards we've discussed and
add some new standards to the mix. Table 5.1 lists the key standards used in native
XML
systems, the organization associated with the standard, and a description of how
the standard is used.