By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,899 Members | 1,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,899 IT Pros & Developers. It's quick & easy.

best way to store data

P: n/a
Hello,

i'm coding a newsreader like outlook.
My question is, how to store the news.
because one entry depends on another...
when I want to display it in a treeview, I have to get all answers to an
entry in a short time,while building the tree.
a sql database where I good way in my eyes, but I can't say that the user
have to install a sql server for a little app, like a newsreader!
I hope, you've understood my english...i'm german :)

thanks
Nov 16 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Hi, i think that the best way instead of sql server its use xml.
Then you could have some xml files instead tables and using any atributes
you can know wich messages are relationed with anothers...

Hope this helps.
Josema.

"Dirk Reske" wrote:
Hello,

i'm coding a newsreader like outlook.
My question is, how to store the news.
because one entry depends on another...
when I want to display it in a treeview, I have to get all answers to an
entry in a short time,while building the tree.
a sql database where I good way in my eyes, but I can't say that the user
have to install a sql server for a little app, like a newsreader!
I hope, you've understood my english...i'm german :)

thanks

Nov 16 '05 #2

P: n/a
yes, but I've heard that xml is not so good when the files get to big...
he said that I should use access databases...I can use the sql syntax to
work with it..

"Josema" <Je******@ocu.org> schrieb im Newsbeitrag
news:C0**********************************@microsof t.com...
Hi, i think that the best way instead of sql server its use xml.
Then you could have some xml files instead tables and using any atributes
you can know wich messages are relationed with anothers...

Hope this helps.
Josema.

"Dirk Reske" wrote:
Hello,

i'm coding a newsreader like outlook.
My question is, how to store the news.
because one entry depends on another...
when I want to display it in a treeview, I have to get all answers to an
entry in a short time,while building the tree.
a sql database where I good way in my eyes, but I can't say that the user
have to install a sql server for a little app, like a newsreader!
I hope, you've understood my english...i'm german :)

thanks

Nov 16 '05 #3

P: n/a
perhaps some code examples for the xml way?

"Josema" <Je******@ocu.org> schrieb im Newsbeitrag
news:C0**********************************@microsof t.com...
Hi, i think that the best way instead of sql server its use xml.
Then you could have some xml files instead tables and using any atributes
you can know wich messages are relationed with anothers...

Hope this helps.
Josema.

"Dirk Reske" wrote:
Hello,

i'm coding a newsreader like outlook.
My question is, how to store the news.
because one entry depends on another...
when I want to display it in a treeview, I have to get all answers to an
entry in a short time,while building the tree.
a sql database where I good way in my eyes, but I can't say that the user
have to install a sql server for a little app, like a newsreader!
I hope, you've understood my english...i'm german :)

thanks

Nov 16 '05 #4

P: n/a
MSDE or even Access since it will only be installed on a single client machine comes to mind. MSDE is quicker, better,
faster and easier to program to.

--
....Carl Frisk
Anger is a brief madness.
- Horace, 20 B.C.
http://www.carlfrisk.com
"Dirk Reske" <_F*******@gmx.net> wrote in message news:uc****************@TK2MSFTNGP09.phx.gbl...
Hello,

i'm coding a newsreader like outlook.
My question is, how to store the news.
because one entry depends on another...
when I want to display it in a treeview, I have to get all answers to an entry in a short time,while building the
tree.
a sql database where I good way in my eyes, but I can't say that the user have to install a sql server for a little
app, like a newsreader!
I hope, you've understood my english...i'm german :)

thanks


Nov 16 '05 #5

P: n/a
Carl,

Agree however difficult to install because by instance (and not alone) the
needed strong password.

Cor
Nov 16 '05 #6

P: n/a
Dirk,

Probably the most easy answer for your question is the dataset on disk.
Assuming that only one user should read and update the information (only
single user).
Keep in mind that by using whatever flat file, what XML files and/or a
Datasets as XML are, to create very good backup procedures. (By instance
when you write it, you should first copy it to a temp etc). A write error
means directly that it does no more existst.

When you want a multiuser approach than you cannot pass MSDE, Access or any
other database (Ms Access will in this be probably much to slow while MSDE
has a data limit of 2Gb).

My 2 eurocents

Cor
Nov 16 '05 #7

P: n/a
Cor,
The problem with Access is not so much speed but it takes a pretty experienced person to write Access code that is
robust enough. SQL (MSDE) takes care of so much under the hood that the Access programmer needs to handle themselves.
I've written Access solutions in the past (back when) that could handle 40+ concurrent users networked worldwide. The
app ran fine for 10 years with nary a glitch. It was later moved to SQL due to the fact the MS quit supporting Access.
And...

I agree I kept the Access db well maintained also. The SQL db maintained itself.

MSDE seems to be the answer except for the 2GB limit. But if the OP is thinking of archiving over 2GB of news then they
should be thinking about archiving in a broader sense anyway and not storing it in the active db.

XML does not seem well suited at all for the task. You would need to implement some kind of index system to accomplish
searches. Along with all the other reasons we moved away from flat db's I think it was like a thousand years ago :)

I would also think about writing my own ISAM db or buying one to distribute. Last I looked there were quite a few C
libraries available.

--
....Carl Frisk
Anger is a brief madness.
- Horace, 20 B.C.
http://www.carlfrisk.com
"Cor Ligthert" <no************@planet.nl> wrote in message news:O7**************@TK2MSFTNGP09.phx.gbl...
Dirk,

Probably the most easy answer for your question is the dataset on disk.
Assuming that only one user should read and update the information (only single user).
Keep in mind that by using whatever flat file, what XML files and/or a Datasets as XML are, to create very good backup
procedures. (By instance when you write it, you should first copy it to a temp etc). A write error means directly that
it does no more existst.

When you want a multiuser approach than you cannot pass MSDE, Access or any other database (Ms Access will in this be
probably much to slow while MSDE has a data limit of 2Gb).

My 2 eurocents

Cor


Nov 16 '05 #8

P: n/a
Carl,

Mostly agreed,

However, except the part of the XML file, what you wrote was exactly why I
wrote the *dataset* and not the XML file (document). In the dataset are a
lot of methods build in that overcome the problems as you wrote with the XML
file.

This last not about security with a flat file, that stays as I wrote it and
comes back in your text as well, while they cannot be larger than the
possible intern memory, what is as well a disadvantage of those.

Cor
Nov 16 '05 #9

P: n/a
thanks for all the answers.
But the user should install it without configuring any databases or
something else...
And the files won't get to big (I can ensure it, by using archiving methods,
when they get it)
perhaps some code examples for using XML as a databse?
"Cor Ligthert" <no************@planet.nl> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP10.phx.gbl...
Carl,

Mostly agreed,

However, except the part of the XML file, what you wrote was exactly why I
wrote the *dataset* and not the XML file (document). In the dataset are a
lot of methods build in that overcome the problems as you wrote with the
XML file.

This last not about security with a flat file, that stays as I wrote it
and comes back in your text as well, while they cannot be larger than the
possible intern memory, what is as well a disadvantage of those.

Cor

Nov 16 '05 #10

P: n/a
Dirk,

A little bit extended one from what I have sent to Maarten yesterday.

\\\
DataSet ds = new Dataset():
DataTable dt = new DataTable("Maarten");
ds.Tables.Add(dt);
dt.Columns.Add("FirstName",Typ*e.GetType("System.S tring"));
dt.Columns.Add("Country".Type.*GetType("System.Str ing"));
dt.Rows.Add(dt.NewRow());
dt.Rows.[0][0]="Maarten";
dt.Rows.[0][1]="Belgie";
dataGrid1.Datasource = ds.Table("Maarten");
///

You can write it as ds.writeXml(path) however keep in mind all what I wrote
about backup changing names etc. to keep everything save

I hope this helps?

Cor
Nov 16 '05 #11

P: n/a
In which case Cor is right on!

--
....Carl Frisk
Anger is a brief madness.
- Horace, 20 B.C.
http://www.carlfrisk.com
"Dirk Reske" <_F*******@gmx.net> wrote in message news:ea**************@tk2msftngp13.phx.gbl...
thanks for all the answers.
But the user should install it without configuring any databases or
something else...
And the files won't get to big (I can ensure it, by using archiving methods,
when they get it)
perhaps some code examples for using XML as a databse?
"Cor Ligthert" <no************@planet.nl> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP10.phx.gbl...
Carl,

Mostly agreed,

However, except the part of the XML file, what you wrote was exactly why I
wrote the *dataset* and not the XML file (document). In the dataset are a
lot of methods build in that overcome the problems as you wrote with the
XML file.

This last not about security with a flat file, that stays as I wrote it
and comes back in your text as well, while they cannot be larger than the
possible intern memory, what is as well a disadvantage of those.

Cor


Nov 16 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.