473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

xml vs databases

I know that databases cannot be replaced by xml , and that they are complement to each other but I want to know if there are some cases or small applications where we need database but we can replace that by using xml only. If there is such cases please give me a small idea about that and what kind of applications can be done like that?
Feb 25 '06 #1
3 2598
Banfa
9,065 Expert Mod 8TB
XML is/was designed as a way of exchanging data rather than storing it for which you would use a database.

However if the amount of data involved was small or did not need to be searched then you could use XML. For storing data XML has the following disadvantages:

1. It is not a very efficient way of storing data, there is a lot of wasted data(or meta data) to carry the actual actual data, for instance to carry somes name and age a database would need a record may be 20 bytes long but you would be hard pressed to fit that data into an xml file of the same size.

2. It is not easily searchable since every record would have to be in a separate file so search a set of records for a field with a given value you would have to open and parse every file.

Where I have seen it in (games) applications is to define the screen layouts (I'm thinking EverQuest), this is a sort of database (of all program screens) however the records do not need searching and they are limited so the data in-efficiency is not a problem and it has the advantage of allowing the user to customise their interface (if they know xml).

I also imagine it could be used to record games levels in the right sort of game.
Feb 25 '06 #2
XML is

2. It is not easily searchable since every record would have to be in a separate file so search a set of records for a field with a given value you would have to open and parse every file.
Sorry, I don't agree with you on this..
Mar 1 '06 #3
Banfa
9,065 Expert Mod 8TB
Sorry, I don't agree with you on this..
That's because you are correct a single xml file could contain a number of records my mistake :)

However a database is optimised for searching (normally) where as data stored in an XML file is stored as text and searching is going to require parsing at least one file and will not be as efficient. Obviously for a low number of small records this overhead may not be significant.
Mar 1 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Gary L. Burnore | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql This is an invitation to discuss the following proposal to create newsgroup comp.databases.mysql. Please note that YOU CANNOT...
8
by: William Drew | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql This is an invitation to discuss the following proposal to create newsgroup comp.databases.mysql. Please note that YOU...
0
by: Cara | last post by:
LAST CALL FOR VOTES (of 2) unmoderated group comp.databases.etl Newsgroups line: comp.databases.etl Extraction, transformation, loading issues. Votes must be received by 23:59:59 UTC, 12 Dec...
1
by: Hai-Chu Hsu | last post by:
Hi, I want to restore my databases from the old SQL Server installation into a new installation of SQL Server. My new installation of SQL Server has different data path from the old...
0
by: Cara Altman | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.etl This is a formal Request For Discussion (RFD) for the creation of a world-wide unmoderated Usenet newsgroup...
3
by: Amit | last post by:
Hi when I try to run LIST ACTIVE DATABASES AT DBPARTITIONNUM <partnum> or LIST ACTIVE DATABASES GLOBAL, I always get an error message. Does anyone know why? I'm on v8 fp 5 output : db2 => list...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
6
by: Andy | last post by:
Someone posted this official proposal to create comp.databases.postgresql.general again. He wrote his own charter. As far as I know, he did not consult any of the postgresql groups first. There...
6
by: Tjerk Wolterink | last post by:
Don't know wether this is the right newsgroup, anyways: Has anyone some experience with Native XML Databases. Im planning to use this: http://exist.sourceforge.net/ It has many advantages...
3
by: AK | last post by:
Hi Our product uses MS-SQL Server 2000. One of our customer has 10 installations with each installation stroring data in its own database. Now the customer wants to consolidate these databases...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.