Efficient non-db storage?

  • Thread starter Thread starter Mike O.
  • Start date Start date
M

Mike O.

What's the most efficient way to store small messages
(similar in size to a short email) on the client without
using a database?

I need to be able to store thousands possibly. I was
thinking of C# classes serialized to XML? How efficient
would this be and what other alternatives are there?

Thanks in advance!.
 
Efficient in what way? Data storage size, insert/update performace, random
access performance, simplicity of programming, etc.

Saving XML data to and from ADO would be simple and flexable.

Inserting the reords to TAB Delimited format would conserve the most disk
space and can be bulk copied to SQL Server in the least amount of time.
 
My primary concern is efficient reading speeds and
sorting. Data storage size is also a concern, but not at
the cost of speed.

I do not plan to attach this to any sort of database, so
importing ease isn't a concern.

Do you still think ADO/XML is the right solution?
 
You can use the Datasets .WriteXML("FileNameandpath") and
ReadXML("FileNameAndPath") to do this. Once you have your datasets, you
won't ever know it didn't come from a 'Real' database.
 
i find the XmlSerialization classes you mentioned very useful for this kind
of thing. in addition, check out the System.IO.IsolatedStorage classes if
you're interested in 'wrapping up' your data with versioning info,
security, etc.

let me know if you have any questions about using these.

jeff.

--

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

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
Serialization could definitely work. Binary serialization should be more
efficient than XML serialization in terms of both file size and speed.
 
Back
Top