数据归档[设计]

发布于 2024-08-15 08:04:18 字数 327 浏览 4 评论 0原文

我正在为使用 Dotnet 和 SQL Server 作为后端的应用程序开发归档模块。通过多种归档方法,我们决定构建一个自定义应用程序,将整个数据库归档到另一个镜像数据库(达到选定的阈值),然后从源数据库中删除已归档的项目。这必须从自定义应用程序完成,而不是从链接服务器、作业、SSIS、复制或任何其他东西完成。

有一些项目将在每次归档运行时被清空并再次重写。在开始构建模块之前,我们正在考虑从镜像存档数据库中删除外键约束,以避免当我们清空这些表并重写时出现任何引用完整性冲突(只有约束将被删除,列和值仍然存在于存档中)数据库)。然而,这种方法对我来说并不可疑,但也有点令人不安。所以我在这里问处理这个问题的正确方法是什么?

I am developing an archive module for an application using Dotnet and SQL Server as back end. From multiple approaches of archiving we've decided to build a custom application to archive the complete database up-to a chosen threshold to another mirrored database and then removing the archived items from source DB. This has to be done from a custom application and not from a Linked Server, job, SSIS, Replication or any thing else.

There are some items which will be emptied and rewritten again on each archival run. Before starting to build the module we were thinking to remove the Foreign Key constraints from the mirrored archived database to avoid any referential integrity violation when we Emptied these tables and re-write (Only constraints will be removed, columns and values still exists in the archived DB). However this approach not even seems fishy to me but kinda disturbing as well. So here I am asking what will be the right approach to deal with this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花之痕靓丽 2024-08-22 08:04:18

我们在问题中坚持这种设计。

We stick to this design in the question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文