基于.NET3.5的最佳策略,创建断开连接的数据库应用程序[英] Best .NET3.5 based strategy for creating disconnected db application

本文是小编为大家收集整理的关于基于.NET3.5的最佳策略,创建断开连接的数据库应用程序的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我的要求是:

  • 相对较小的数据库:25-30 个表,每个表有 4-5k 行.
  • 4-5 个用户在他们的笔记本电脑上拥有自己的本地数据库副本.在需要时或在一天结束时同步.
  • 免费解决方案,因为我正在为 NFP 组织进行此设置.

    最近几天我一直在研究各种选择.最后我想缩小到数据集,同时将它们序列化为 XML,但似乎这毕竟不是一个好主意(我之前问题的答案强烈暗示了这一点.)

    所以我现在的问题是我应该采取什么方法(数据库和访问技术)?我想使用 c# 和一种易于使用的技术来访问我的数据库并在一天结束时同步它.

    根据此链接:http://msdn.microsoft.com/en-us/library/8fxztkff.aspx,MS 提出了两种不同的方法.我很惊讶他们没有在这里提到 LINQ.

    那么组,你推荐什么路径?

    非常感谢阅读.

    推荐答案

    添加 -> 新建 -> "本地数据库缓存".这应该提供您需要的所有同步(通过 ADO.NET 同步框架),默认情况下由 SQL CE 运行 (IIRC),这是(我相信)免费的.

    其他推荐答案

    查看Microsoft 同步框架.

    <块引用>

    介绍 Microsoft 同步框架——综合同步平台启用协作和离线应用程序、服务和设备支持任何数据类型,任何数据存储,任何传输协议,以及网络拓扑.

    其他推荐答案

    如果已经有 SQL Server(标准版或更高版本),您可以使用 SQL Server 复制服务将数据库的本地副本同步到用户计算机上的 SQL Express 或 SQL Server Compact 实例(两者都是免费的).

    有关详细信息,请尝试此处.

    听起来您正在研究合并复制方案.

    本文地址:https://www.itbaoku.cn/post/597624.html

  • 问题描述

    My requirements are:

  • Relatively small database: 25-30 tables with 4-5k rows in each.
  • 4-5 users with their own copies of local database on their laptops. Sync when needed or at the end of the day.
  • Free solution, as am making this setup for a NFP ogranization.

    I have been researching various options in last few days. At last I was thinking of narrowing to Datasets, while serializing them to XML, but it seems that it is not a good idea afterall (answers to my previous questions suggested that strongly.)

    So my question now is what approach (database and the access tech.) should I take? I would like to use c# and an easy to use technology to access my database and sync it at the end of the day.

    According to this link: http://msdn.microsoft.com/en-us/library/8fxztkff.aspx, MS suggests two different approaches. I am surprised to see that they have not mentioned LINQ here.

    So group, what path do you recommend?

    Thanks a lot for reading.

    推荐答案

    Add -> New -> "Local Database Cache". This should provide all the sync you need (via ADO.NET Sync Framework), running (IIRC) by SQL CE by default, which is (I believe) free.

    其他推荐答案

    Have a look at the Microsoft Sync Framework.

    Introducing the Microsoft Sync Framework – a comprehensive synchronization platform enabling collaboration and offline for applications, services and devices with support for any data type, any data store, any transfer protocol, and network topology.

    其他推荐答案

    If there is a SQL Server (Standard or higher) already in place, you can use SQL Server Replication Services to sync local copies of the database to either a SQL Express or SQL Server Compact instance on the user's machine (both of these are free).

    For more information, try here.

    It sounds like you'd be looking at Merge replication scenario.