[XML4LIB] Databases or XML

Andrea Giuliano a.giuliano at iccu.sbn.it
Tue Feb 12 12:38:36 EST 2002

A. Bullen wrote:

 >Dear all,
 >At the urging of Roy Tennant, I am asking you all the same question that
 >I asked him.
 >Please pardon a rather naive question. I am a database programmer; that
 >is, I put library SQL/ODBC connected databases on Internet-accesible
 >platforms and build Web interfaces to them using Perl and Java. I have,
 >of course, heard a great deal about XML and the revolution in
 >information presentation. My question to use is: why do I need to work
 >in XML when I can do everything in a sense better by using a database? I
 >can replace XSLT/DTDs etc. with server side includes that detect browser
 >types, and present the screen to the client accordingly by having a
 >series of if/then statements in my presentation code. In short, I can
 >build dynamically presented pages 'til the cows come home. What am I
 >I appreciate any comments or thoughts you might have on my dilemna.
 >Andrew Bullen
 >Illinois State Library
Dear Andrew,

as someone already pointed out on the list, XML is a good choice to
exchange data between application, because of the tree structure of an
XML document, a very versatile data structure. But, from a mathematical
point of view, relational databases are graphs, and trees are just a
very particular kind of graphs. So every tree is itself a graph but, on
the other hand, not evey graph can be arranged as a tree. So you can run
across a database which cannot be arranged as a tree, whatever you do.

XML has the ID-IDREF feature to give a document a graph structure,
creating links between nodes that are on different branches of the tree
(just like symbolic links in UNIX filesystem). But I have not a good
practice with such a feature, except for DocBook documents, not a good
example when speaking of databases. Though, it could be a way to map a
database in a XML document .

Anyway, I think the only reason to do this is to serialize part of the
content of a database in order to upload this content in another
database, maybe much different from the source. In this respect, clearly
XML is an alternative to MARC formats.

Best regards.

(To reply to this message, remove ".abc" from the address)

Andrea Giuliano, Ph. D.
Virtual System Administrator
ICCU - Istituto Centrale per il Catalogo Unico
Viale Castro Pretorio 105, Rome - ITALY
Tel. +39064989509, Fax +39064059302

More information about the xml4lib mailing list