aspose file tools*
The moose likes XML and Related Technologies and the fly likes XML instead of a Relational Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML instead of a Relational Database" Watch "XML instead of a Relational Database" New topic
Author

XML instead of a Relational Database

Alagu Seenivasan
Greenhorn

Joined: Sep 30, 2000
Posts: 18
Hi Guys,
I am doing some research on using xml instead of RDBMS to store persistent data (or store xml data in an RDBMS)
I would appreciate any directions or links to related resources on the net.
Thank you,
Srini.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
XML may not be able to substitute an RDBMS because of lack of advanced features like indexing, enforcing unique-key constraints, setting up foreign-keys and cross references etc.
XML is a way of representing data and may not be a good choice in situations where huge amount of data need to be stored and retrieved in an efficient manner.
Usually XML/Java applications retrieve the data from an RDBMS, format it as an XML document and pass it back and forth between business layers and heterogeneous clients. I haven't heard of a situation where XML technology itself is being used as a large-scale persistence medium. I think the reasons are obvious.
Ajith


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Alagu Seenivasan
Greenhorn

Joined: Sep 30, 2000
Posts: 18
I understand that XML is not a substitute for RDBMS.
What prompted me to try to capture persistent data in the form of xml as a seperate entity or with in an RDBMS table, are two things
Firstly the project ORACLE did.
"Oracle moved the site's assets (documents, images, scripts, etc.) from file systems around the world into a single content management system (CMS) that they built on the Oracle8i platform."
This includes storing HTML content as is, in a table as a CLOB (character Large Object ?)
http://technet.oracle.com/products/oracle8i/index2.htm?Info&htdocs/cms/cmsdb.html
Secondly, the article "Creating XML based web applications using visual age for java" from the November'00 edition of Java Developer Journal. The authors explain a "Conference Survey Application" where they suggest to keep the data in XML.
(The data is the results of the survey. How many votes per category etc. Not a complex data)
Following is the explanation.
"using XML documents as the vehicle for persistent data, you maintain the flexibility to mine the data as you deem fit without being forced down any particular path in terms of how it will be presented. For the amount of data being represented here, using a relational database would be overkill, while using serialized beans is overly complex. Because XML is self-describing by definition, and XML parsers are readily available, using XML is preferable to a flat file (which might use, for example, name-value pairs), where the programmer is forced to write a custom parser."
I still beleive that while XML is not a substitute for RDBMS, it can be an alternative some times.
What do you think ?


[This message has been edited by Alagu Seenivasan (edited December 04, 2000).]
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Pay attention to the sentence "using XML documents as the vehicle for persistent data" .I concur with the author, it is really a vehicle for data, but not the storage itself.
For small applications that need to deal with relatively less data, traditionally designers have always favoured using simpler storage representations - like flatfiles or serialized object files. I think it is really a design decision whether or not to use a RDBMS( or even a DBMS ), and driving factor for such a decision should not just be the "volume" of data your application needs to handle, but also features that I outlined in my previous post( indexing, searching, enforcing relations etc.)
While using XML as persistent storage may eliminate an RDBMS from your equation, it will introduce another variable- need for translators. If in the future, your application needs to talk to non-XML layers, then you will have to cook raw data from the "XML Storage" and send it across. The raw data I am talking about is the row in a table or a view, which is 100% language neutral.
Bottom line- I think RDBMS is the way to go if you want to isolate persistence and provide different ways of ( simple and advanced ) access to the data. XML will take the presentation one step further, but may not( in the near future?? ), as a medium of persistence, cater to all the requirements of an otherwise data-intensive appliation.
Again, I welcome contesting opinions
Ajith
Alagu Seenivasan
Greenhorn

Joined: Sep 30, 2000
Posts: 18
1. "Arbortext's Epic E-Content Engine (E3) aggregates content from disparate sources, converts that content to reusable XML components, stores those components in a content repository, and assembles and distributes content to a multitude of devices."
http://www.arbortext.com/Products/Product_Overview/Epic_E-Content_Engine/epic_e-content_engine.html
2. From Bluestone's article "Building Financial Applications Using Dynamic XML servers"
"XML servers break down into two basic categories
respository XML servers and dynamic xml servers.
Repository-based XML servers essentially store XML documents for efficient storage, update and retrieval. As one would expect, these server products tend to be offered by databse companies as well as some of the traditional SGML companies like Arbortext, Poet and Inso. These servers will become important as more information begins to be held and stored in XML documents "
http://www.bluestone.com/SaISAPI.dll/SaServletEngine.class/downloads/pdf/WatersConference.pdf
------
Content management is one application where data can be stored in XML format. I am still trying to find out what are these XML servers and what is an XML Repository etc
- Srini.

Alagu Seenivasan
Greenhorn

Joined: Sep 30, 2000
Posts: 18
Recently I came across an interesting product, XYZFind
( http://www.xyzfind.com )
XYZFind is a persistent repository for XML integrated with a powerful search and query processor.
Features
Repository
� A single repository for all XML, regardless of document type.
� Indexes any well-formed XML (DTD agnostic; no schema design or configuration required).
� Incremental Update Incrementally add or delete documents from the repository. Automatically handles changes to document structure in addition to changes in the data values.
� No restrictions on number or types of documents
� Built-in statistics about the documents including the number of occurrences of each unique value (both text and numeric), the hierarchical relevance (what level of depth in the parent-child hierarchy) for every value in the index, and the minimum and maximum values for numeric elements.
Search and Query
� Global Search
� Path-specific search
� Query support for Boolean operators
� Open-ended queries (wildcard query any of a given element's children)
� Unrooted queries (match patterns requiring no absolute path)
� Queries on numeric ranges
Results
� Aggregated results (Document/sub-document content, versus a listing of URLs)
� Directives on which fields to return and/or suppress in returned results
� Metadata results, including lists of available document types, lists of documents, and schema descriptions
� Results pagination
� Aggregated results across common and extended schemas
Interfaces
� XML / HTTP (using XYZQL, our XML Query Language)
� Java API
erich brant
Ranch Hand

Joined: Sep 27, 2000
Posts: 246
This java/xml project has indexing check it out!
www.jdom.org
I also uses java collections.
Map and List ( Hashtable and linked list data structures )
http://www.jdom.org/docs/faq.html

Quote from site.
We intend to provide a solution for using XML from Java that is as simple as Java itself.
There is no compelling reason for a Java API to manipulate XML to be complex, tricky, unintuitive, or a pain in the neck. JDOMTM is both Java-centric and Java-optimized. It behaves like Java, it uses Java collections, it is completely natural API for current Java developers, and it provides a low-cost entry point for using XML.
While JDOM interoperates well with existing standards such as the Simple API for XML (SAX) and the Document Object Model (DOM), it is not an abstraction layer or enhancement to those APIs. Rather, it seeks to provide a robust, light-weight means of reading and writing XML data without the complex and memory-consumptive options that current API offerings provide.


http://
Prasad Ballari
Ranch Hand

Joined: Sep 23, 2000
Posts: 149
Ajith & Seenivasan
This would be the odd question here in this context,Hope you will bear this.
I would like to know ; when you transmit xml file to client for basic reason of reducing return trips to the server,i.e querying at client side,But assume if atall the process involves lot records to to handled then how come xml will be the solution..
Thanks in advance
prasad
Alagu Seenivasan
Greenhorn

Joined: Sep 30, 2000
Posts: 18
There are few xml based communication protocols under development.
SOAP (Simple Object Access Protocol) is one of them.
SOAP is a light weight communication protocol used for communication between applications. It is designed to communicate via HTTP and it is based on XML.
Any protocol whether http or xml-rpc, if it involves "lot of records" will be slower than "few records"

[This message has been edited by Alagu Seenivasan (edited December 20, 2000).]
 
 
subject: XML instead of a Relational Database