什么是WPF应用程序的最佳本地数据库解决方案? [英] What is the best local-database solution for WPF applications?

查看:2095
本文介绍了什么是WPF应用程序的最佳本地数据库解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前最适用于一台计算机的WPF应用程序的最佳解决方案,其中各种用户登录并使用它们在本地获取/保存信息?以下是我看到的选项:

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 似乎是最好的选择,因为我假设您可以将其锁定得很好,以便即使用户可以访问.mdf文件,它们仍然无法访问其中的数据,除非通过应用程序本身。我假设.MDF文件将必须与应用程序分开存在,因此将部署.exe和.mdf文件。如果您使用.MDF文件,用户需要安装SQL Server才能使用

  • 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?

我认为 SDF 不会被推荐,因为它有很多限制,主要用于移动存储。

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

XML 可能适合,如果安全没有影响,例如

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 可能是一个选择,但从我知道的这个数据库的.NET的API不是那么健壮,是吗?

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生成报告,则可以选择访问。

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

还有 IsolatedStorage ,但我相信这有严重的局限性,不是,例如无法从其他应用程式存取?

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

也许使用云端服务

感谢任何反馈或想法。

推荐答案

SQL Server Compact Edition也是一个选项 - http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx

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

部署相当简单单击或通过将引擎dll复制到应用程序目录。

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

这篇关于什么是WPF应用程序的最佳本地数据库解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆