R. Alex

I have a few ideas for several software packages that I'd like to take a stab at creating with C# but I'm stuck with how and where I'd like to store the data generated. I don't expect there would be a tremendous amount of records involved but there are things like schedules, tasks, logs, etc... I'd like to start out creating a shareware or maybe attach a small fee so that means keeping my tools really inexpensive. Can anyone give me a suggestion or some best-practice advice on what sort of storage solution is being used for small applications that can be deployed for anyone to use
Thanks...


Re: Visual C# General Best storage practices

VS_Programmer

You really have several choices, R. Alex:

You can:

1) Write to plain text files (.txt)

2) Write to a database and let them take care of the details (eg. SQL)

3) Create your own filetype (eg. .myp and register it into the registry --- DIFFICULT & Advanced)

4) Store it on a online internet storage site (Some problems...)

5) Use an well-known filetype (eg. XML)

I would either use 1, 2 or 5. They are the easiest and the least complicated.

Hope this helps





Re: Visual C# General Best storage practices

mwalts

I agree. I'd use either an access database (which has a nice scalability advantage if you decide to upgrade your program later on) or XML (which has the advantage of portability, and can still allow for a decent upgrade to a database if you do it right). I'd argue that nowadays there is little reason to write out plain text files.

-mwalts




Re: Visual C# General Best storage practices

R. Alex

Thanks folks for the responses.

SQL would be my prefered choice but if I were to use SQL formatted tables, wouldn't that require expensive licensing for each user considering there could be fees associated with the end product In other words, creating a shareware with a nominal fee, regardless of how small, would break the licensing agreement for most free versions of any databases I've looked at but I want to keep the cost as low as possible. This is the very delema that led me to seek alternatives. I see shareware/freeware checkbooks, calendars, music players, FTP programs, etc... and wonder how they're storing all those records so they can be retrieved efficiently. Is there a way of using SQL (legally) without a lot of $$$

XML was my next choice but I wasn't sure of the limitations regarding how much data could be stored.
- Alex




Re: Visual C# General Best storage practices

Steve Py

For relatively small amounts of data you can play around with serialized ADO.Net Datasets, this can give you basic SQL-like functionality with no cost.

Other options are to look at something like MSDE (2000) One combination I've used before was to develop an SQL Server database using SQL Server Developer Edition (includes Enterprise Manager, Query Analyser, etc.) then deploying the scripts to an MSDE instance. If you don't need heavy concurrent data access then MSDE should be more than enough grunt.






Re: Visual C# General Best storage practices

R. Alex

Thanks a lot folks. It looks like I've got some reading to do to explore these options in more depth. I really appreciate the input.
- Alex




Re: Visual C# General Best storage practices

O.Miller aka phoboss

for small applications, xml is the best choice because it is easy to handle and relatively light-weight...