2

I need to develop a simple accounting application, like customers, suppliers and accounting stuff (debit/credit) etc. in WinForms using Visual Studio.

I have never developped a standalone appliation with Database, I've always developped a server side application (existing SQL server etc)...

I like to develop a standalone application with DB. I mean: creating a setup project (setup.exe/setup.msi) and sent to the customer and he/she should install on his windows pc

with following technologies: VS 2012 Pro Entity Framework with LINQ Windows Forms.

The question I have: Which Database do I need to use? these customers don't have SQL server or whatever. Just a simple Windows 7/8 system. So I'm struggling with which Database to choose. I can't install for every customer a sql server on his pc. so need away with automation.

I will sent them regularly update like setup.msi/setup.exe file to update the application.

Since I will use LINQ/ Entity Framework, I'm not worried which which DB to use.

Can someone advice me which DB to use and tell me the tricky points which I need to cover?

so in fact the Winforms application should run on a standalone Windows PC with X database (MDB, MDF, mysql or whatever).

Please advice how to bridge the Database part.

thanks

ethem
  • 2,888
  • 9
  • 42
  • 57

2 Answers2

3

Have you tried SQLite? It has pretty specific use-cases as it's an in-process SQL DBMS (generally speaking, it's not suitable for multi-user applications), but this sounds like it might be a good fit for your application, if I'm understanding your use of standalone.

The advantages are performance, and its serverless, zero-config nature, . Take a look at Appropriate Uses For SQLite and the FAQ to see if it's right for you.

pixelbadger
  • 1,556
  • 9
  • 24
  • No multiuser is needed. The only thing is installation with less manual intervention and no extra stuff like sql servermanagement needed. Question: Do you need to instal SQLLite upfront or separated? – ethem Mar 12 '13 at 16:06
  • It's in-process, so just comes as a DLL which is loaded as part of your application. There is also an ADO.NET style managed wrapper library (System.Data.SQLite) which is supported by Entity Framework, according to the [Wikipedia Entry](http://en.wikipedia.org/wiki/ADO.NET_Entity_Framework#Entity_Framework_ADO.NET_providers). – pixelbadger Mar 12 '13 at 16:08
  • ok. where and how do you develop the Tables? – ethem Mar 12 '13 at 16:49
1

Consider Microsoft SQL Compact Edition; this is an embedded database that runs in your application. It does not include some features like triggers and procedural extensions, but it is much simpler to use than DBMSes like SQLite, and requires no administration from users.

Also, Visual Studio 2010 comes with tools for building and deploying CE databases; you don't need to install anything.

Dour High Arch
  • 21,513
  • 29
  • 75
  • 90
  • this looks great DHA. but how do you create the Tables/columns? – ethem Mar 12 '13 at 16:54
  • You can create them directly in Visual Studio; Project > Add > New Item > Data > Local Database. Or you can create them at run-time with regular SQL CREATE statements. – Dour High Arch Mar 12 '13 at 17:58
  • Hi Dour High Arch, ok I created the *.SDF file and the EDMX model, I used generate from a Database. Now if I create a setup project, how will be the deployment then, I mean will it automatically put the SDF file in the setup package, what about the connectionstring setting then ? I mean I will everything arranged in the setup project and installed on the client computer with (setup.msi/setup.exe file)???? – ethem Mar 12 '13 at 18:29
  • @mesut, you need to follow a tutorial; for example at [MSDN](http://msdn.microsoft.com/en-us/sqlserver/bb895908.aspx). There are many different ways of using databases; without requirements we can only guess; I suspect this is why the question was closed. For one example, consult [this question](http://stackoverflow.com/a/13313075/22437). – Dour High Arch Mar 12 '13 at 18:34