XML database: Difference between revisions

Content deleted Content added
m fix cn tag
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(12 intermediate revisions by 8 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 sometimes stored, in [[XML]] format. This data can be [[XQuery|queried]], transformed, exported and returned to a calling system. XML databases are a flavor of [[document-oriented database]]s which are in turn a category of [[NoSQL]] database.
 
== Rationale for XML inas databasesa database format ==
There are a number of reasonsReasons to directly specifystore data in XML or other document formats suchformat as [[JSON]]. Foran XML in particular, theydatabase include:<ref name=nicola2010>{{cite web|last1=Nicola|first1=Matthias|title=5 Reasons for Storing XML in a Database|url=http://nativexmldatabase.com/2010/09/28/5-reasons-for-storing-xml-in-a-database/|website=Native XML Database|access-date=17 March 2015|date=28 September 2010}}</ref>
<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
* An enterprise may have a lot of XML in an existing standard format
* 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 sparseparse data, deeply nested data and mixed content (such as text with embedded markup tags)
* 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
 
Steve O'Connell gives one reason for the use of XML in databases: the increasingly common use of XML for [[transport layer|data transport]], which has meant that "data is extracted from databases and put into XML documents and vice-versa".<ref name=oconnell2005>{{cite report|author=O'Connell, Steve|work=Advanced Databases Course Notes|title=Section 9.2|type=Syllabus|date=2005|publisher=[[University of Southampton]]|___location=Southampton, England}}</ref>{{update inline|date=March 2015}} It may prove more efficient in terms of conversion costs,{{Citation needed|date=December 2024}} and easier to store the data in XML format. In content-based applications, the ability of the native XML database also minimizes the need for extraction or entry of metadata to support searching and navigation.
 
== XML-enabled databases ==
Line 39:
xmlexists('$j[licence="CreativeCommons"]', passing journal as "j")
</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 159 ⟶ 170:
{{Refbegin}}
 
 
== External links ==
* [https://db-engines.com/en/ranking/native+xml+dbms Ranking of Native XML DBMS] by popularity, updated monthly, from [[DB-Engines ranking|DB-Engines]]
* [http://www.cfoster.net/articles/xmldb-business-case XML Databases - The Business Case, Charles Foster, June 2008] (broken link) - Talks about the current state of Databases and data persistence, how the current Relational Database model is starting to crack at the seams and gives an insight into a strong alternative for today's requirements.
* [http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-3717 An XML-based Database of Molecular Pathways (2005-06-02)] Speed / Performance comparisons of eXist, X-Hive, Sedna and Qizx/open
* [https://web.archive.org/web/20070922082133/http://swing.felk.cvut.cz/index.php?option=com_docman&task=doc_view&gid=5&Itemid=62 XML Native Database Systems: Review of Sedna, Ozone, NeoCoreXMS] 2006
* [http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/ic/&toc=comp/mags/ic/2005/02/w2toc.xml&DOI=10.1109/MIC.2005.48 XML Data Stores: Emerging Practices]
* Bhargava, P.; Rajamani, H.; Thaker, S.; Agarwal, A. (2005) ''XML Enabled Relational Databases'', Texas, The University of Texas at Austin.
* [https://web.archive.org/web/20070113224941/http://xmldb-org.sourceforge.net/ Initiative for XML Databases]
* [http://www.rpbourret.com/xml/XMLAndDatabases.htm XML and Databases, Ronald Bourret, September 2005]
* [https://web.archive.org/web/20071011101718/http://cafe.elharo.com/xml/the-state-of-native-xml-databases/ The State of Native XML Databases, Elliotte Rusty Harold, August 13, 2007]
 
{{Refend}}