XML as a database alternative?

E

Edgard L. Riba

Hi,
I was thinking that a database alternative for the compact framework could
be to load an XML database into a dataset, and use that (the dataset) as the
database.

Has anybody done anything like this? Any comments on this ideas would be
very welcome <g>...

Best regards,
Edgard L. Riba
 
S

Shanti

Yes, it is amazingly simple, but XML file size also increases very rapidly,
compared to using either tab or comma delimited files.
 
R

Richard L Rosenheim

Yes, I've done it. But, be advise, it's not a solution that works with
every problem. In general terms, the smaller the amount of data, the better
using XML files as a database works. As the filesize grows, so does the
time it takes for the program to populate the dataset, and the amount of
memory required to hold the resulting dataset.

The basic difference is that the entire XML file is loaded into the dataset,
while with a database, only those records which match the search criteria
are loaded. Of course, depending upon your application, it may be the same.

Richard Rosenheim
 
V

Vinay Chaudhari

Richard said:
Yes, I've done it. But, be advise, it's not a solution that works
with every problem. In general terms, the smaller the amount of
data, the better using XML files as a database works. As the
filesize grows, so does the time it takes for the program to populate
the dataset, and the amount of memory required to hold the resulting
dataset.

The basic difference is that the entire XML file is loaded into the
dataset, while with a database, only those records which match the
search criteria are loaded. Of course, depending upon your
application, it may be the same.

Richard Rosenheim

I will also like to add that if ur amount of data is small and u have
decided to use XML as data store and further wanted to use DataSet
object to load the XML data then create the dataset schema in memory
and then load xml files (with IgnoreSchema) option. For me this trick
saved 3-4 seconds.

-Vinay.
 
E

Edgard L. Riba

Hi,

My application has quite a bit of data (75000) records, but the application
needs to constantly lookup these records. Pocket access has a limit on the
number of records, so I was looking for an alternative.

Thanks for all the information shared,
Edgard L. Riba
 
K

Kevin Boske - [MS]

SQL Server CE has .NET Compact Framework support for just this kind of
application. You can find a link to our website below.

SQL Server CE has no limit on the number of records, just the size of the
database (2GB).



Kevin Boske
([email protected])
SQL Server CE Team
Microsoft
----------------------------------------------------------------------------
----------------------------------------
Everything you need to know about SQL Server CE:

http://www.microsoft.com/sql/ce/techinfo/default.asp
----------------------------------------------------------------------------
----------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
----------------------------------------------------------------------------
----------------------------------------
--------------------
From: "Edgard L. Riba" <[email protected]>
References: <[email protected]>
Subject: Re: XML as a database alternative?
Date: Mon, 22 Sep 2003 14:05:15 -0500
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <u$6#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: cablemodem-228-213.cableonda.net 200.75.228.213
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:34145
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi,

My application has quite a bit of data (75000) records, but the application
needs to constantly lookup these records. Pocket access has a limit on the
number of records, so I was looking for an alternative.

Thanks for all the information shared,
Edgard L. Riba
 
G

Ginny Caughey [MVP]

Edgard,

As others have said, for that number of records XML would be much too slow. It
would also be a very bulky way to store the data because of all the extra space
needed for the tags. I really think SqlCE is your best bet here.
 
R

Rick Winscot

SQL CE is very powerful indeed. If you add some carefully thought out
indexes to your tables... the performance increase on selects is quite
impressive.

Rick Winscot
rickly@zyche dot com
 
C

Carl Rosenberger

Edgard said:
My application has quite a bit of data (75000) records, but the application
needs to constantly lookup these records. Pocket access has a limit on the
number of records, so I was looking for an alternative.

Hi Edgard,

you could give our object database for CF a try:
http://www.db4o.com

There is no limit on the number of objects stored
except for a 2GB limit per database file.

Kind regards,
Carl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top