PC Review


Reply
Thread Tools Rate Thread

Dataset as a database - is it possible?

 
 
Mike Peretz
Guest
Posts: n/a
 
      1st Feb 2005
I would like to use a dataset as a data file (like a database). However, I
didn't find a way to use SQL on the Dataset (except on a DataView, but then
Dataset is all loaded.). I also noted that I must flush the whole dataset to
disk and load it all to read it. I wonder, if there is a better way to use a
dataset as a persistent storage.


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      1st Feb 2005
You can think of a DataSet as a RDBMS held in memory.

Why do you need to use SQL on a DataSet (there are other ways to CRUD with a
DataSet)?

DataSets are XML Serializable, so taking its contents and storing it to disk
as XML and then reading from that XML is a relatively easy thing to do.

"Mike Peretz" <(E-Mail Removed)> wrote in message
news:MZDLd.4773$(E-Mail Removed)...
>I would like to use a dataset as a data file (like a database). However, I
> didn't find a way to use SQL on the Dataset (except on a DataView, but
> then
> Dataset is all loaded.). I also noted that I must flush the whole dataset
> to
> disk and load it all to read it. I wonder, if there is a better way to use
> a
> dataset as a persistent storage.
>
>



 
Reply With Quote
 
Sahil Malik
Guest
Posts: n/a
 
      1st Feb 2005
It is a really underpowered database - so don't go putting millions of rows
in it.

Other ways to browse data in a dataset are DataTable.Select, Find, Relations
(GetChildRows, GetParentRow). etc.

And instead of complete flush and reload, you could instead do a
dataset.merge.

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/


"Mike Peretz" <(E-Mail Removed)> wrote in message
news:MZDLd.4773$(E-Mail Removed)...
>I would like to use a dataset as a data file (like a database). However, I
> didn't find a way to use SQL on the Dataset (except on a DataView, but
> then
> Dataset is all loaded.). I also noted that I must flush the whole dataset
> to
> disk and load it all to read it. I wonder, if there is a better way to use
> a
> dataset as a persistent storage.
>
>



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      1st Feb 2005
Mike,

The answer is simple, No.

The XML file is a file. Not a database.

By instance is it complete single user.

Cor


 
Reply With Quote
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      1st Feb 2005
Hi Mike,

What are you trying to achieve?
If you want a "no-installation" database you might take a look at Firebird.
Here is an article on this topic:
http://www.codeproject.com/useritems...edFirebird.asp

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

"Mike Peretz" <(E-Mail Removed)> wrote in message
news:MZDLd.4773$(E-Mail Removed)...
>I would like to use a dataset as a data file (like a database). However, I
> didn't find a way to use SQL on the Dataset (except on a DataView, but
> then
> Dataset is all loaded.). I also noted that I must flush the whole dataset
> to
> disk and load it all to read it. I wonder, if there is a better way to use
> a
> dataset as a persistent storage.
>
>



 
Reply With Quote
 
=?Utf-8?B?RXh0cmVtZSBEYXRhc2V0cw==?=
Guest
Posts: n/a
 
      2nd Feb 2005
Hello Mike,

As long as you are just storing items and don't need a full fledged RDBMS,
ie a small application or a configuration file, i would go with Scott and
persist as an xml file. Also, you don't need to flush you can update, delete,
insert on your dataset.

In addition to Miha, it really depends on what you are trying to accomplish

"Mike Peretz" wrote:

> I would like to use a dataset as a data file (like a database). However, I
> didn't find a way to use SQL on the Dataset (except on a DataView, but then
> Dataset is all loaded.). I also noted that I must flush the whole dataset to
> disk and load it all to read it. I wonder, if there is a better way to use a
> dataset as a persistent storage.
>
>
>

 
Reply With Quote
 
Mike Peretz
Guest
Posts: n/a
 
      3rd Feb 2005
This is for a very simple layout that will hold no more then 50 records.
Thank you for all your feedback, I think my approch is fine, as long as I
don't go nuts with volunme.


"Extreme Datasets" <(E-Mail Removed)> wrote in
message news:9E90BC18-B295-4A99-AEEE-(E-Mail Removed)...
> Hello Mike,
>
> As long as you are just storing items and don't need a full fledged RDBMS,
> ie a small application or a configuration file, i would go with Scott and
> persist as an xml file. Also, you don't need to flush you can update,

delete,
> insert on your dataset.
>
> In addition to Miha, it really depends on what you are trying to

accomplish
>
> "Mike Peretz" wrote:
>
> > I would like to use a dataset as a data file (like a database). However,

I
> > didn't find a way to use SQL on the Dataset (except on a DataView, but

then
> > Dataset is all loaded.). I also noted that I must flush the whole

dataset to
> > disk and load it all to read it. I wonder, if there is a better way to

use a
> > dataset as a persistent storage.
> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server dataset read from database A and write to database B RWC Microsoft ADO .NET 2 29th Jan 2007 07:31 PM
Dataset X DataBase Rodrigo Microsoft Dot NET Compact Framework 4 5th Jul 2004 01:15 AM
Dataset X DataBase Rodrigo Microsoft C# .NET 1 5th Jul 2004 01:15 AM
Xml > DataSet >Database Nathan Pledger via .NET 247 Microsoft ADO .NET 3 5th May 2004 02:37 PM
Updating database from Typed Dataset without loading entire database Jeremy Summers Microsoft ADO .NET 2 10th Sep 2003 06:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:57 AM.