2

I am planning on building a C# WPF desktop application with a PostgreSQL database (to store using settings and some textbox data).

The user of this application will NOT have a database server on their computer. Can I build a "built-in"/"run-time" database (whichever it's called) with WPF application?

I'm new to database application, and my question is:

  1. Can I deploy a WPF application with PostgreSQL, and user can install and still use the application without a SQL server?

  2. Is deploying an application where user has a SQL server would have any difference to deploying an application where user does not have a SQL server?

I need something of high performance. I have up to 50 concurrent insertion each inserting data in speed of 10 milliseconds, and I'm storing thousands of data in seconds to the database. I don't think SQLite or SQL compact would do that job. I needed the database to be embedded though

2
  • Do you mean built-in database? Commented Apr 6, 2011 at 16:22
  • Why don't you think SQLite would work? Commented Apr 6, 2011 at 17:35

5 Answers 5

2

Take a look at SQL Server Compact Edition.

Support for ClickOnce, XCopy, MSI, CAB, and non-admin embedded installation options

Edit* What about Sql Server Express, Check this out Embedding SQL Server Express into Custom Applications

Sign up to request clarification or add additional context in comments.

3 Comments

I need something of high performance. I have up to 50 concurrent insertion each inserting data in speed of 10 milliseconds, and I'm storing thousands of data in seconds to the database. I don't think SQLite or SQL compact would do that job. I needed the database to be embedded though.
How much data are you looking to store? Also, are you looking to have multiple users accessing the same embedded database or will each user have there own instance for lack of better word?
Each user will have only one instance. And the user can store all the settings and datas into one file where they can upload it later one
1

It looks like you don't really need SQL per se, so take a look at LevelDB and see if a Key-Value store can fit your needs.

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

It is written in C++ and very fast:

Write Performance 
fillseq      :       1.765 micros/op;   62.7 MB/s
fillsync     :     268.409 micros/op;    0.4 MB/s (10000 ops)
fillrandom   :       2.460 micros/op;   45.0 MB/s
overwrite    :       2.380 micros/op;   46.5 MB/s

Comments

0

If the user tries to install the application and has no access to the database holding settings and textbox data the application will not work. You will need to have your installer deploy the database as well. I would look into something like sqlite for installation alongside your application.

2 Comments

@grantik I remember whenever I installed some software (with database) I don't see any database installed in my computer. What do you mean deploying an application together with a database?
grantk: Any decent embedded database can work without having something preinstalled. They can create and seed the database from code. @KMC you should at least see a file - usually in %AppData% or the app folder - that "is" the database. sqlite and Berkeley DB are just files with a library to access these files efficiently.
0

For that purpose I can suggest you to use Firebird which doesn't have any difference in working with local or remote db

Comments

0

Plesase consider using VelocityDB which is by mine test the best compromise between price and performance for the embedded db solution. It is a NoSQL approach. It supports Linq queries. ORM is not needed just need to implement a generic repository to emulate EF kind of behaviour. 600000k records inserted in 8s 150ms to filter 3k from that subset. Fast.

RavenDB is slightly faster but its footprint in terms of Mb per database is more than 3x bigger than VelocityDB ones. Also RavenDB TCO are elevated.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.