Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best local-database solution for WPF applications?

What is currently the best solution for WPF applications which are meant to be used on one computer where various users log into them and use them to get/save information locally? Here's how I see the options:

  • MDF would seem to be the best choice since I assume you can lock it down quite well so that even though users can access the .mdf file, they still couldn't access the data in it except through the application itself. I assume the .MDF file would have to exist separately from the application so would deploy the .exe and the .mdf file. Oh, if you use an .MDF file, does the user need SQL Server installed to use it as is indicated in this stackoverflow question?

  • I would think SDF wouldn't be recommended since it has quite a bit of limitations and used mainly for mobile storage.

  • XML might be appropriate if security didn't matter, e.g. a small one-user application to save data that locally that he wouldn't secure anyway, and this file would be easily accessed by other applications/websites on the computer.

  • SQLite might be a choice but from what I know the APIs for .NET for this database aren't that robust yet, are they?

  • .mdb Access might be a choice if you needed users to also edit/view the data or generate reports with Access.

  • there is also IsolatedStorage but I believe this has serious limitations, doesn't it, e.g. not able to access it from other applications?

  • perhaps using a cloud service might be feasible and quite straight-forward nowadays, would have to investigate

Would appreciate any feedback or ideas.

like image 1000
Edward Tanguay Avatar asked Jun 12 '09 15:06

Edward Tanguay


People also ask

Which database is best for Visual Studio?

MySQL. MySQL is a popular open-source database system that is widely used in enterprises and websites. Downloads for MySQL, MySQL for Visual Studio, and related products are at MySQL on Windows.

What is a WPF application C#?

WPF, stands for Windows Presentation Foundation is a development framework and a sub-system of . NET Framework. WPF is used to build Windows client applications that run on Windows operating system. WPF uses XAML as its frontend language and C# as its backend languages.


1 Answers

SQL Server Compact edition is also an option - http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx

Deployment is pretty easy using ClickOnce or by copying the engine dlls to the application directory.

like image 183
Dan Avatar answered Nov 16 '22 02:11

Dan