Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database functionality with WPF app: SQLite, SQL CE, other? [closed]

I want to extend a WPF application with database functionality. Which database engine would you suggest and why? SQLite, SQL CE, other?

like image 960
Alan Le Avatar asked Sep 15 '08 21:09

Alan Le


3 Answers

Depending on the applications use, I would recommend using SQL Lite because it doesn't require you to install any other software (SQL CE or Express, etc. usually would require a separate install).

A list of the most important benefits for SQL Lite from the provider link at the bottom of this post:

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. Features include:

  • Zero-configuration - no setup or administration needed.
  • Implements most of SQL92. (Features not supported)
  • A complete database is stored in a single disk file.
  • Database files can be freely shared between machines with different byte orders.
  • Supports databases up to 2 terabytes (2^41 bytes) in size.
  • Small code footprint: less than 30K lines of C code, less than 250KB code space (gcc on i486)
  • Faster than popular client/server database engines for most common operations.
  • Simple, easy to use API.
  • Self-contained: no external dependencies.
  • Sources are in the public domain. Use for any purpose.

Since you're using WPF I can assume you're using at least .NET 3.0. I would then recommend going to .NET 3.5 SP1 (sames size as .NET 3.5 but includes a bunch of performance improvements) which includes LINQ.

When using SQLite, however, you would want to use the following SQLite Provider which should provide LINQ support: An open source ADO.NET provider for the SQLite database engine

like image 83
John Rennemeyer Avatar answered Oct 08 '22 09:10

John Rennemeyer


I used SQL Compact Edition with my WPF app and I'm happy with my decision. Everything just works (since WPF and SQLCE are both MS they play nicely together), and the installation of the runtime is small enough and smooth enough for my needs. I created and modified the database through visual studio.

like image 39
AndrewS Avatar answered Oct 08 '22 09:10

AndrewS


Just to throw out a differing opinion, we've been using SQL Compact Edition for the last year and have been generally satisfied with. The configuration is cake and it behaves very similar to a regular MS SQL database. There are things missing, like triggers and stored procedures, but SQL 3.5 CE has virtually everything else we'd need. It's about 2Mb of .dlls to install. It offers database encryption, transactions, and supports VS's typed dataset designer (3.1 had some problems, but CE 3.5 is great!).

like image 22
Bob King Avatar answered Oct 08 '22 10:10

Bob King