+2  A: 

Personally for me its more about the data than the number of users using an application.

Think about your data, is it complex? If you were to actually create a database how big would it be in terms of objects, not the amount of rows... how many tables etc...

Think about the future, although its only one user, the data is still going to increase I presume, and how much data will be saved each time?

The database approach will speed up your development no doubt - and your data will have better integrity than an XML file. I hate using files personally... I've had experiences in the past where data has gone missing etc from the file.

Remember, there is always SQL Compact Edition should you want to keep your resources limited.

Dal
Probably only two tables in terms of objects... a customer object table and a job site object table.I worry about SQL CE because of the 4gb limit. Granted, that is a lot of data considering I'm not storing anything large, but the app should really allow the user to enter data in for years, without having any problems.
O.R.
Since you have concerns about 4gb being exceeded that immediately shows that a database is definelty a viable option. A 4gb XML file would be very slow compared to a 4gb database... I would defo go the DB route, cHao makes some good suggestions on choices
Dal
+3  A: 

A full-blown client/server database like MySQL or SQL Server would probably be overkill for a single user. But you'd probably get some use from an embedded/file-based engine like SQLite or SQL Server CE, especially if you want to do more with the data than just look up single records by ID. If you did the data storage yourself, you'd have to write loads of code to get records meeting certain criteria, and i all but guarantee you won't do as well at it as the people who do it for a living.

cHao
+1  A: 

If you implement your storage functions in a repository 1) 2) , you can start with storing to files, and then moving to a database storage if you later identify a need to do so

1) http://martinfowler.com/eaaCatalog/repository.html
2) http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/10/08/the-repository-pattern.aspx

Per-Frode Pedersen
+4  A: 

Without knowing more about what your specific application does, it's hard (for us) to say whether a database is the right choice. However, there are some rules of thumb that you can use to help steer your decision.

A database may be a good choice when:

  • The data may be used by multiple users.
  • When concurrent activity is possible that must be correctly stored.
  • When the data collected does not all need to be loaded into memory at once.
  • When you wish to be able to query or report on data in complex ways.
  • When you want to have transparency into the data being stored using standard tools.
  • When changes are mostly localized rather than requiring the entire datastore to be rebuilt.
  • When your data lends itself to a relational (rather than say a hierarchical representation).

A database may not be the best choice when:

  • You only service a single user.
  • There is little concurrent activity, and the entire data model must be recreated when saving changes.
  • When there will be very little data, and it will be loaded into memory all at once.
  • When you data is hierarchical or difficult to model relationally.
  • When your application is document-oriented, and documents (files) will be sent to other users.
  • When there is a significant amount of binary data interspersed in the data your storing.
  • When you want to avoid dependencies to third party tools or services.
  • When the structure of your data model is likely to change frequently.

These are all rules of thumb ... no single condition is going to dictate whether to use a database or not. You must examine all of the considerations, and decide whether using a database will give you sufficient benefit - or not.

In many environments, (such as iPhone, for example) there is a built-in database layer available directly on the platform. There are also tools (like NSCoreData) which help you overcome the Object-Relational Modeling (ORM) impedence mismatch. In such cases, it may make a lot of sense to use a database ever for very simple data storage.

There are also a number of open source data persistence layers (NHiberante, DB4O, and others) that help simplify using a database as a persistence store ... which, if you can use them, can shift the equation in favor of using a database.

A database can substantially simplify the development of your application when you need to support queries or search functionality. Relational databases support a query language (SQL), which moves the effort of identifying and retrieving results from the database much easier. Letting the database do the heavy lifting can be a significant time saver - as databases are specifically designed to perform query operations correctly and efficiently. However, this comes at the cost of a well-designed relational data structure - which you must create.

One significant consideration, is whether users will share the data that they create/consume using your application. If your application is more document oriented (think Word, Excel, Powerpoint), then a file-based serialization model may be more appropriate. If your application's data will not be shared - then a database may make sense.

Another significant factor is how open you want your data to be. Databases store information in well-defined structures (tables), and this makes it easier for you (and your users) to directly access and inspect the data. Storage formats like XML, also allow this, but to a somewhat lesser extent.

LBushkin
A: 

"The program can have a infinite amount of data, but that data will only be used by a single user that is using the application."

"...export it to an external file that can be easily shared between applications/users."

"Its basically data entry for customer information, and then provides functionality to find and display customer subsets based on search options."

This sounds to me like a database would be worth considering -- particularly SQLite. It is a relational database management system that can be embedded in your application and that stores data in files. The "embedded" part means that unlike other more heavy-duty databases, your users won't have to install or configure servers or even know the database exists. And each database is stored as a file, which exactly fits your criteria. The downsides of SQLite are mainly that it doesn't work very well for multiple users simultaneously, but that isn't an issue here.

If you decide to go with SQLite, you should check out System.Data.Sqlite, a library that lets you easily communicate with SQLite databases from C#.

jloubert