473,405 Members | 2,349 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,405 software developers and data experts.

best way to store data

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
11 6463
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
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
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
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
Carl,

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

Cor
Nov 16 '05 #6
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: clwoods | last post by:
I would like to ask is thier a better way to store data other than access tables, I would still like to keep access as the front end. My main quest I suppose is for more speed and maybe security....
3
by: Forconi Boris via .NET 247 | last post by:
Hi, I'm working on a project in witch I have to list data(products that can be selected with a certain quantity) from anXML document, with key words entered by the user. A Table isdynamically created...
2
by: jmensch | last post by:
Hello. I'm a reasonably new ASP.NET programmer with no prior ASP or web development experience, but a lot of general programming experience. I'm using Visual Web Developer Beta Express 2005. ...
36
by: Crirus | last post by:
Hi I have about 1000 records of users to store.. I dont like the ideea of a database server... How to store does data in a structured way? An XML? How big can became such an xml, because I...
3
by: piotrek | last post by:
Hi I would like to ask you a question. Ian creating app. that download from server directory structure ( whole tree ) and those data are placed in proper places into my treeview control. I...
5
by: res7cxbi | last post by:
hi, im familiar with xml but wondering if it would be better to store data within attributes: <root> <data value="someData"/> </root> or within nodes:
1
by: rocksoft | last post by:
Hi, I have working in Asp.net and C# application, i have used visual studio 2003 for my project, my project i need this logic, how to store data in data grid to database by single mouse click,...
3
nurulshidanoni
by: nurulshidanoni | last post by:
i hava a data student id examcode 1 002 006 001 2 123 589 How to store data when it have...
2
by: creative1 | last post by:
Is this possible to store data in an XML file using HTML form? I got it working other way. I can store data in an xml file and display it in html form. I need to do it other way. It is very urgent. ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.