Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET Data Storage - Database vs single file

I have a C# application that allows one user to enter information about customers and job sites. The information is very basic.

  • Customer: Name, number, address, email, associated job site.
  • Job Site: Name, location.

Here are my specs I need for this program.

  • No limit on amount of data entered.
  • Single user per application. No concurrent activity or multiple users.
  • Allow user entries/data to be exported to an external file that can be easily shared between applications/users.
  • Allows for user queries to display customers based on different combinations of customer information/job site information.
  • The data will never be viewed or manipulated outside of the application.
  • The program will be running almost always, minimized to the task bar.
  • Startup time is not very important, however I would like the queries to be considerably fast.

This all seems to point me towards a database, but a very lightweight one. However I also need it to have no limitations as far as data storage. If you agree I should use a database, please let me know what would be best suited for my needs. If you don't think I should use a database, please make some other suggestions on what you think would be best.

like image 331
O.R. Avatar asked Aug 18 '10 17:08

O.R.


People also ask

Is it better to store files in database or filesystem?

Database provides a proper data recovery process while file system did not. In terms of security the database is more secure then the file system (usually). The migration process is very easy in File system just copy and paste into the target while for database this task is not as simple.

Why is database better than file system?

Data sharing: The file system does not allow sharing of data or sharing is too complex. Whereas in DBMS, data can be shared easily due to a centralized system. Data concurrency: Concurrent access to data means more than one user is accessing the same data at the same time.

Which is faster DB or file?

It depends how big the file(s) are, how selective the query is, and whether the keys used in the update or select are indexed. If the database has to do a full-table scan, it's likely to be slower than a file. That's something database schemas are usually designed to avoid.

What is the difference between a file and a database?

A File System is a collection of raw data files stored in the hard-drive, whereas a database is intended for easily organizing, storing and retrieving large amounts of data. In other words, a database holds a bundle of organized data typically in a digital form for one or more users.


1 Answers

My suggestion would be to use SQLite. You can find it here: http://sqlite.org/. And you can find the C# wrapper version here: http://sqlite.phxsoftware.com/

SQLite is very lightweight and has some pretty powerful stuff for such a lightweight engine. Another option you can look into is Microsoft Access.

like image 122
Icemanind Avatar answered Sep 22 '22 12:09

Icemanind