Ashpool is a lightweight XML Database written in Java™. It's goal is to use standard SQL92 syntax to query, add, update, and delete XML documents via a JDBC driver. The XML documents must hold to a table like structure. The reason for the table structure restriction is that SQL was designed to query table data not hierarchical data.
The Ashpool engine via JDBC drivers can be used to query any XML document; however, it is best used with documents that have a table like structure for the first three levels. The "column" section of the table structure can contain integer, float, string, dateTime or XML fragments. Ashpool can be used to search for XML documents inside of an XML document (for example, as a serialized bean store), or used as a lightweight relational database.
All the while Ashpool's "tables" are XML, so transmitting them over HTTP, running them through FOP, or editing them with a text editor are all possible - it other words you do not loose the power of XML.
Along with SQL, Ashpool also can use the Bean Scripting Framework to create stored procedures and scripts.
Not everything is roses though. Because Ashpool is querying XML, Ashpool can get slow when large amounts of information are involved. Ashpool uses SAX (unlike some other products) so it can handle somewhat larger documents then others, but do not expect Enterprise Database performance. Performance issues do not show their head unless you are using encrypted documents or the documents contain a "large" amount of data.
Ashpool defines a "table like structure" to mean an XML document like the following:
<any_root_node> <any_row_node> <column_node_a>data</column_node_a> <column_node_b/> [...] </any_row_node> [...] </any_root_node>
where all any\row_node_ elements have the same named and number of child elements. If the 'column' being queried contains child nodes instead of simple data (int, string, dateTime, etc) the returned column contains the document fragment.
This project uses the Git version control system. You can clone the repository on GitHub
Here are some test databases to play with. Simply unzip them and point Ashpool to the folders. For example, $./Ashpool.sh northwindXML.
- Northwind - the typical MS demo database in XML form (the demo one on Access and MSSQL)
- Factbook - the CIA publishes facts about all the countries on earth. This is an XML version. (Note: this is a single xml file not a datastore)
- The King James Bible
- The Quran