What is an XML database?
Posted: Mon Jan 27, 2025 9:17 am
An XML database stores data in XML format - to be precise: XML documents. The data is accessed using XQuery. Saving a file is amazingly simple. XML documents are read in and stored indexed. The type and extent of indexing can, but do not have to, be specified in detail. Indexing is done by attributes, by text and/or for a full-text search. For example, to persist the file MyCustomers.xml as a customer database, the following XQuery script is sufficient:
or in case all attributes (in our brazil telegram screening case the customer number) and additionally only the text contents of the <Surname> elements are required as an index:
updindex is set so that the indexes are automatically updated with each write access. More on this later.
To get an idea of the performance of an XML database, I created a customer base with just over 300,000 customers as a file using the example above and then persisted this as an XML database. In the first case, where all text fields are indexed, my (relatively weak) laptop needed just under 36 seconds. In the second case, where the indexing was optimized, it took 25 seconds. The result in each case was a database with a size of around 100 MB and around 5.4 million nodes. So we can conclude: Persisting XML data in XML databases is simple and very high-performance.
or in case all attributes (in our brazil telegram screening case the customer number) and additionally only the text contents of the <Surname> elements are required as an index:
updindex is set so that the indexes are automatically updated with each write access. More on this later.
To get an idea of the performance of an XML database, I created a customer base with just over 300,000 customers as a file using the example above and then persisted this as an XML database. In the first case, where all text fields are indexed, my (relatively weak) laptop needed just under 36 seconds. In the second case, where the indexing was optimized, it took 25 seconds. The result in each case was a database with a size of around 100 MB and around 5.4 million nodes. So we can conclude: Persisting XML data in XML databases is simple and very high-performance.