4

I have created a simple (commercial) WPF application and want to distribute it with a database that can be installed on the local machine of a customer.

What database is the best to use ?

I was considering SQL Server Epress Edition 2008. I know the limitations of 10 GB, but that's more than enough and is no issue.

The only thing I'm not choosing 100% for Express is that I don't know how to let my customer backup the database.

My collegues keep telling me to use MS Access, but I don't know if that's a good option because I want to use stored procedures and views.

Please let me know what you are using or you can advise me...

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Ruutert
  • 395
  • 1
  • 7
  • 18
  • I agree with others that SQLite is good for your purposes, but if your only worry with SQL Server Express is making backups, you should see e.g. ["How can I schedule a daily backup with SQL Server Express?"](http://stackoverflow.com/questions/487675/how-can-i-schedule-a-daily-backup-with-sql-server-express). – StackExchange saddens dancek Mar 23 '11 at 22:36
  • 2
    SQL Server Express **2008** has a 4 GB limit - the **2008 R2** version upped that to 10 GB – marc_s Mar 24 '11 at 05:37

4 Answers4

6

SQLite is a great alternative. There is an ADO.NET provider developed by System.Data.SQLite

And there is a decent, free, editor for SQLite as well: SQLite Administrator

Backing up is as easy as copying the SQLite db file. Really.

Metro Smurf
  • 37,266
  • 20
  • 108
  • 140
5

What is the estimated amount of data?

For small databases SQLite may be an good choice - it is light, fast, opensource and needs no additionally software. It even supports encryption, if you need that.

Backup is as easy as it could be, as the SQLite-database consists of a single file.


Ruutert: database-size up to 500 mb:

That size should be no problem for SQLite. We use databases up to several GB. Only problem on big databases is, that vacuum (like reorg / compress unused space) takes as longer as bigger the database is (but that is the same for other database-types)


Ruutert: disadvantages of SQLite?

You could get problems with High Concurrency (lots of parallel database-access). Also I would consider an client-server oriented database-manager if your workload is so heava that you think about moving your database-manager to another server - splitted from application-server.

But as you considered using SQL Server Express or MS-Access, which have limited functionality too, that should not be the problem. On the other side you have the advantage that you need just an small dll (or compile it static into one of you own) instead of installing an complete database-manager.

MacGucky
  • 2,494
  • 17
  • 17
4

An embedded database (like SQLite, which others answerers already mentioned) sounds like the right choice for you.

Since you're using .net anyway, how about Microsoft's SQL Server Compact?
(also an embedded database)

Christian Specht
  • 35,843
  • 15
  • 128
  • 182
  • SQL Server Compact . is only for developers ? – Ruutert Mar 23 '11 at 23:07
  • SQL CE is not just for developers. Its a stand alone, well, compact sql server. SQLite is the SQL CE alternative. – Metro Smurf Mar 23 '11 at 23:19
  • ok, i'm just a (.NET) developer, no DB specialist. Most of the time, the project I work on, there is already a SQL SERVER installed, this is the first time I work on a windows (WPF) project with a stand alone DB – Ruutert Mar 23 '11 at 23:34
  • 1
    +1 for recommending SQL Server Compact Edition. The new version 4 is quite a nice piece of software indeed! One file, easily deployed, all libraries included as .NET assemblies - sweet! – marc_s Mar 24 '11 at 05:38
3

SQL-CE does not include stored procedures.

SQLite is usually the chosen one. However, there is also VistaDB.

You could always look into NoSQL or OO databases:

Note that some of these may need separate DLLs in order to expose the providers in .NET code.

Adam Houldsworth
  • 63,413
  • 11
  • 150
  • 187