Content deleted Content added
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 |
|||
(22 intermediate revisions by 16 users not shown) | |||
Line 1:
{{Short description|Database presenting data in XML formats}}
{{update|date=March 2015}}
An '''XML database''' is a [[data persistence]] software system that allows data to be specified, and
== Rationale for XML
<ref name=feldman2013>{{cite conference|last1=Feldman|first1=Damon|title=Moving from Relational Modeling to XML and MarkLogic Data Models|url=http://www.marklogic.com/resources/slides-moving-from-relational-modeling-to-xml-and-marklogic-data-models/resource_download/presentations/|conference=MarkLogic World|conference-url=http://world.marklogic.com/|date=11 April 2013|access-date=17 March 2015}}</ref>
* An enterprise may have numerous XML documents with similar data, but dispersed in different XML formats. Conglomerating this data into a singular, standardized XML database structure will avoid compatibility issues
* Data may need to be exposed or ingested as XML, so using another format such as relational forces double-modeling of the data
* XML is very well suited to
* XML is human readable whereas relational tables require expertise to access
* [[Metadata]] is often available as XML
* Semantic web data is available as [[Resource Description Framework|RDF]]/XML
* Provides a solution for [[Object-relational impedance mismatch]]<ref>[NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence. Addison-Wesley Educational Publishers Inc, 2009] {{ISBN|978-0321826626}}</ref>
* Compatibility with XML use on the [[transport layer|data transport]] layer
XML
▲== XML enabled databases ==
▲XML enabled databases typically offer one or more of the following approaches to storing XML within the traditional relational structure:
#XML is stored into a CLOB ([[Character large object]])
#XML is `shredded` into a series of Tables based on a Schema<ref name=oracle>{{cite book|title=Oracle XML DB Developer's Guide, 10''g'' Release 2|date=August 2005|publisher=Oracle Corporation|chapter-url=http://docs.oracle.com/cd/B19306_01/appdev.102/b14259/xdb05sto.htm|access-date=17 March 2015|chapter=XML Schema Storage and Query: Basic}}. Section [http://docs.oracle.com/cd/B19306_01/appdev.102/b14259/xdb05sto.htm#i1042421 Creating XMLType Tables and Columns Based on XML Schema]</ref>
#XML is stored into a native XML Type as defined by ISO Standard [[SQL#Anatomy of SQL Standard|9075-14]]<ref name=iso9075-2011>{{cite web|title=ISO/IEC 9075-14:2011: Information technology -- Database languages -- SQL -- Part 14: XML-Related Specifications (SQL/XML)|url=http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=53686|publisher=[[International Organization for Standardization]]|access-date=17 March 2015|date=2011}}</ref>
RDBMS that support the ISO XML Type are:
Line 31 ⟶ 28:
#PostgreSQL<ref name=postgresql>{{cite book|title=PostgreSQL 9.6 Documentation|chapter-url=https://www.postgresql.org/docs/9.6/static/datatype-xml.html|access-date=1 April 2017|chapter=8.13. XML Type}}</ref>
Typically an XML
=== Example of XML Type Query in IBM DB2 SQL ===
Line 43 ⟶ 40:
</syntaxhighlight>
== Integration with relational databases ==
XML databases are often used in combination with relational databases to manage and store hierarchical data. A significant challenge in such integrations is extracting XML documents from relational databases, which requires specialized techniques and tools. These techniques often include:
# Mapping Relational Data to XML: Schema mapping is a critical process that defines how relational tables correspond to XML elements and attributes.
# XQuery Processing: Querying XML data extracted from relational databases may involve XQuery, a language designed for querying and transforming XML.
One of the most common scenario involves converting relational data into XML documents<ref>{{Cite web |date=2025-01-01 |title=Extracting XML Documents from Relational Databases - 7 Tips |url=https://vividorigins.com/xml-documents-from-relational-databases/ |access-date=2025-01-06 |website=Vivid Origins |language=en-US}}</ref> to facilitate standards with systems relying on XML-based standards, such as web services or APIs. This process is important in applications where structured and semi-structured data co-exist and must be integrated perfectly.
For example, extracting hierarchical data from relational databases and converting it into XML is a common approach when generating XML feeds, exchanging data between systems, or implementing XML-based configurations.
== Native XML databases ==
Native XML databases are especially tailored for working with XML data. As managing XML as large strings would be inefficient, and due to the hierarchical nature of XML, custom optimized data structures are used for storage and querying. This usually increases performance both in terms of read-only queries and updates.<ref>{{cite web|last1=Matthias|first1=Nicola|title=XML versus Relational Database Performance|url=https://nativexmldatabase.com/2010/08/22/xml-versus-relational-database-performance/|website=Native XML Database|access-date=28 Jun 2017|date=22 August 2010|archive-date=4 March 2017|archive-url=https://web.archive.org/web/20170304072744/https://nativexmldatabase.com/2010/08/22/xml-versus-relational-database-performance/|url-status=dead}}</ref> XML nodes and documents are the fundamental unit of (logical) storage, just as a [[relational database]] has fields and rows.
The standard for querying XML data per W3C recommendation is [[XQuery]]; the latest version is XQuery 3.1.<ref>{{cite web|url=http://www.w3.org/TR/xquery-31/ | title=XQuery 3.1 Recommendation | date=2017-03-21}}</ref> XQuery includes [[XPath]] as a sub-language and XML itself is a valid sub-syntax of XQuery. In addition to XPath, some XML databases support [[XSLT]] as a method of transforming documents or query results retrieved from the database.
=== Language features ===
{{sort-under}}
{| class="wikitable sortable sort-under"
|-
! Name
Line 98 ⟶ 105:
|Oracle Berkeley DB XML
| {{Proprietary|Commercial}}
|C/C++
|
|
Line 117 ⟶ 124:
|[[Sedna (database)|Sedna]]
|Apache License 2.0
|C/C++
|
|
Line 163 ⟶ 170:
{{Refbegin}}
{{Refend}}
Line 183 ⟶ 181:
[[Category:Data modeling]]
[[Category:XML databases| ]]
[[Category:Database management systems]]
|