How would I create a Database Application without the end user having to install a Database Server

Posted on 2014-10-29
Medium Priority
Last Modified: 2014-10-30

I'm looking to develop a very simple database application that will need to read and write data to maybe 3 or 4 tables. I have SQL Server Express 2008 installed on my dev pc, and will be coding in VS2008 / C#.

I'd like to be able to deploy my application with a simple setup file (exe / msi) and have the end user simply install it and go. I'm looking at ideas on how I would go about creating / shipping the actual datasource. Every thing I search for online regarding database and visual studio ALWAYS talks about installing SQL Server (CE / Express / Full etc.), but I'd rather not have to ask the users of my application to install a separate program.

Not really looking for specific answers here, just a few general ideas on how to create and ship a database application without the user having to install a database server.


Question by:Chris Stanyon
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

SerjTech earned 400 total points
ID: 40412292
Might be worth looking at either:

SQL Server Compact

or SQLite

Your basically looking for a self contained / serverless database
LVL 25

Assisted Solution

chaau earned 400 total points
ID: 40412293
I would suggest you use SQLite. It has a SQLite.net module which is supported by the community. Then, when you ship your program you would either ship it with an empty .sqlite database or have the program to create one upon first launch. The latter option will require you to run a couple of "CREATE TABLE" commands from within the application itself. I actually prefer the latter option as it allows you to add/modify the tables should your new software updates require database changes.
LVL 23

Assisted Solution

Snarf0001 earned 400 total points
ID: 40412295
You can also look at SQL Server LocalDB:


Was designed to do pretty much what you're asking for, with all of the same T-SQL commands / syntax as Express.
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

LVL 49

Assisted Solution

PortletPaul earned 400 total points
ID: 40412315
If the application is very simple as you describe then SQLite may be all you need. There is more overhead in other suggestions (all of which are relevant though, I am late to the party it seems).

A disadvantage of SQLite is that isn't full T-SQL compatible and there are some restrictions (e.g. no RIGHT OUTER JOIN) that may not be familiar to you. It is very actively supported and extremely commonly used for the type of deployment you describe.
LVL 43

Author Comment

by:Chris Stanyon
ID: 40412318
Thanks guys,

Very quick response and some good pointers. I'm going take a little time to read through the links you've provided and may be back with a follow up question or two.

Bear with me while I get my head around the various options.
LVL 24

Assisted Solution

mankowitz earned 400 total points
ID: 40412346
Although I like sqlite because it is compact, it is still one more thing to package into your application. Remember that if you are using .net, you can use datatables upon which you can execute most queries that you will need. If all you want to do is look up data for the user, this is the cleanest solution.

If the user will be updating the data, you will have to persist it between executions. For that, you could write an XML file (as in WriteXml("XMLFile.xml")) or you could simply add it to my.settings
LVL 43

Author Comment

by:Chris Stanyon
ID: 40414698
Thanks everyone. All excellent suggestions that give me enough options and plenty of reading  to do.

Initial thoughts are that a SQL Compact DB file seems ideal. Some of the development I do is also for handheld mobile devices running Windows CE, and it seems suited to that side of things as well - so one solution seems to cover both platforms.

SQLite also seems like a viable option for both platforms, so will definitely look into that. At the moment, the app I'm working on isn't particularly complex, so limitations in SQLite may not be a problem, although trying to guess the future and keep things scalable may play a part in my decision.

The SQL Server LocalDB seems to be a newer format introduced in later version of VS - I'm using 2008, so doesn't look like an option.

I did originally consider text files for the data (aka XML), and may still look at that as an option - be interesting to know how XML as a datasource performs against a 'traditional' database setup.

All valid responses, so I'm going to share the points evenly
LVL 43

Author Closing Comment

by:Chris Stanyon
ID: 40414702
EE does it again :)

Thanks everyone

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question