Click to See Complete Forum and Search --> : XML vs Database


summit310
01-31-2005, 10:00 AM
Hello:

For starters, I'm new to XML. I've been asked to work on a Content Management System. I've done some research on the internet and discovered that some people use XML and while others use databases for data storage.

I understand everything about structure, DTD's, schemas, etc. I've seen lots of documentation in these areas.

There is one feature with which I'm confused.

In the database world, you can have a customer table. If you want to add a customer, you basically run an INSERT INTO query. The database is updated/appended with the new customer.

In XML, I cannot find any documentation discussing the ability to update and existing XML file. Is it possible to have a customer.xml file and be able to add new customers to this file? All I've managed to discover is that there is a seperate XML file for each customer.

Let's say you have 10 customers. With a database, you have one table consisting of 10 records. With XML, my understanding is that you 10 XML files, one for each customer. Is this true?

What is the advantage of using XML rather than a database?

Thank you in advance for your input.
:)

Khalid Ali
02-01-2005, 11:25 PM
No advantages using XML in place of a RDBMS.
If you want to create a CMS, then to make your websites more persistant use DB, xm should only be used for content delivery mechanism not content storage system.

summit310
02-02-2005, 10:25 AM
Thank you for your reply. My instict was to use a database. I just read that many people are using XML for content management systems.

geekazoid
02-21-2005, 08:56 PM
yeah I would rather use a database,

but if you're familiar with JAXB Marshall and Unmarshall you could read and write to XML.

Khalid Ali
02-21-2005, 10:10 PM
Hey geek you are from calgary, sweet....me too..:D

geekazoid
02-21-2005, 11:39 PM
Yeppers. Just stumbled into this forum, it's pretty cool, a great place to learn.


Small world
:)

Khalid Ali
02-22-2005, 07:23 AM
Originally posted by geekazoid
Small world


No doubt, these forums are awsome. I learned allot several years ago and eversince I am stuck here..heheheh