Databases Reference
In-Depth Information
other NoSQL databases, do allow queries on mixed content and as a result can sup-
port a number of security models and standardized query languages.
Native
XML
databases store and query a wider range of data types than any other
NoSQL data store. They have an expressive data format that allows you to store struc-
tured tables as well as unstructured documents, and they provide superior search ser-
vices. They tend to support web standards better than other document stores, which
increases their portability between native
XML
systems. But the reason most organiza-
tions choose native
XML
databases is because they increase application development
productivity and their ease of use allows nondevelopment staff to build and maintain
applications.
After reading this chapter, you'll understand the basic features of native
XML
data-
bases and how they're used to solve business problems in specific areas such as pub-
lishing or search. You'll become familiar with the process of building a native
XML
database application and transforming
XML
data, searching, and updating elements,
and you'll see how standards are used to accelerate application development. Finally,
since almost all native
XML
databases use the XQuery language to query documents,
we'll look at how XQuery is used to transform
XML
documents and how it can be
extended to include new functionality.
Defining a native
XML
database is the first step in understanding when and how
they can help you solve business problems. In the next section, we'll start with a defini-
tion and then give some examples of the types of problems native
XML
databases can
help you solve.
5.1
What is a native XML database?
Native
XML
databases use a document data architecture pattern. Like other document-
oriented databases, they have no need for middle-tier, object-relational mapping, nor
do they use join operations to store or extract complex data. Their ability to calculate
hashes for each query and document makes them cache-friendly, and their ability to
store data in a distributed environment allows them to scale elegantly.
Native
XML
databases existed before the term
NoSQL
was popular. They're more
mature in some areas, and they integrate well with web standards managed by the
World Wide Web consortium (
W3C
). Today you see native
XML
databases such as
MarkLogic in areas of government, intelligence, integration, publishing, and content
management.
Native
XML
databases are unique in the NoSQL world because they attempt to
reuse data formats and standards to lower overall development costs. The philosophy
is driven by avoiding the introduction of proprietary database-specific query lan-
guages that will lock your application into a single database. Native
XML
databases are
forced to compete against each other in terms of ease of use, performance, and the
ability to scale queries without needing to introduce new
API
s. Many of the open
source native
XML
databases share both concepts and extension functions.