架构正在变化的应用程序的数据迁移过程?

发布于 2024-08-05 07:31:26 字数 216 浏览 5 评论 0原文

在使用一个应用程序超过 10 年之后,并不断受到其缺乏可扩展性的限制,我们决定从头开始完全重写它。由于新的架构与旧的应用程序不同,因此数据库也不同。问题来了:是否有任何工业流程可以将数据从以前的数据库迁移到新数据库? 有些表是相似的,有些表则不然。总的来说,我们需要一个流程来帮助我们确保在迁移过程中不会丢失数据或逻辑约束。

PS:新旧数据库均为Oracle数据库。

After having used an application for over 10 years, and been constantly limited by its lack of extensibility, we have decided to rewrite it fully from scratch. Because the new architecture differs from the old application, the database is also different. Here comes the problem: Is there any industrial process for migrating the data from the previous database to the new one? Some tables are alike, others are not. Overall, we need a process that will help us make sure that no data or logical constraints is lost during the migration.

PS: The old and new database are both Oracle databases.

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

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

发布评论

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

评论(2

揪着可爱 2024-08-12 07:31:26

尽管您没有在问题中指定这一点,但我假设您将开发应用程序/数据库的新版本,然后在某个切换点,您需要将所有实时数据从旧数据库迁移到您的数据库中。新数据库。

如果是这种情况,那么您实际上是在询问两个不同的过程:数据库结构的迁移(经过一些修改),然后是数据本身的迁移。

对于第一个过程,最好的工具是你,开发人员(我并不是说你是一个“工具” - 你知道我的意思)。您可以引入旧数据库的结构,然后根据新版本的需要进行更改;然而,这种方法通常会留下太多旧结构。我认为最好利用这种情况,从头开始重建数据库,使用原始数据库作为一般参考。

对于第二个过程,我会将数据迁移视为一项单独的任务,需要单独编写和测试的应用程序。该应用程序可以是一组脚本或编译的应用程序或任何对您来说最方便的应用程序。由于您的旧数据库和新数据库不会具有相同的结构(实际上可能非常不同),因此没有商业工具可以自动为您处理此任务。通过将其视为您自己编写的独特应用程序,您可以在“上线”日期之前多次测试数据转换过程。

Although you don't specify this in your question, I assume that you're going to develop the new version of your application/database, and then at some switchover point you need to migrate all of the live data from your old database into your new database.

If this is the case, then you're really asking about two distinct processes: the migration (with some modifications) of the database structure, followed later by the migration of the data itself.

For the first process, the best tool is you, the developer (I don't mean you're a "tool" - you know what I mean). You could bring over the structure of the old database and then change it as necessary for the new version; however, this approach in general tends to leave too much of the old structure behind. I think it's better to take advantage of the situation and rebuild the database from the ground up, using the original database just as a general reference.

For the second process, I would treat the data migration as a separate task requiring a separately-written and -tested application. This application could be a set of scripts or a compiled application or whatever is most convenient for you. Because your old and new databases will not have the same structure (and may in fact be very different), there are no commercial tools out there that will handle this task for you automagically. By treating this as a distinct application that you write yourself, you can test the data conversion process many times before your "go live" date.

辞慾 2024-08-12 07:31:26

我听说过几种不同的方法来解决此类问题。我见过的最简单的解决方案是使用 Microsoft Access 数据库并使用 ODBC 连接来连接新旧 Oracle 数据库。然后,您可以根据需要使用 Access 迁移和转换数据。

更优雅的解决方案涉及安装 Microsoft SQL Server 开发工具。您可以使用 Business Intelligence Development Studio 创建具有两个 Oracle 端点的 SSIS 包。 SSIS 可以处理数据库之间数据转换的繁重工作,并且您可以在本地运行该包,因此您不必在任何地方运行 SQL Server 实例。

SSIS 教程系列位于:

http://www.developerdotstar.com/community/node/ 364

您可能还想查看 Oracle Warehouse Builder (OWB) 。这个名字有点令人困惑,但它是 Oracle 的 ETL(提取、转换和加载)包。我个人从未使用过它,但它也可能达到您想要的效果。

I've heard of several different ways to attack problems such as this. The most simple solution I've seen is to use a Microsoft Access database and use ODBC connection to connect to both the new and old Oracle databases. You can then use Access to migrate and transform the data as you need.

The more elegant solution involes installing Microsoft SQL Server Development tools. You can use Business Intelligence Development Studio to create a SSIS package with two Oracle endpoints. SSIS can handle the heavy lifting of transforming the data between the databases and you can run the package locally so you don't have to have an instance of SQL Server running anywhere.

There's a tutorial series for SSIS at:

http://www.developerdotstar.com/community/node/364

You might also want to check out Oracle Warehouse Builder (OWB). The name is a little confusing, but it's Oracle's ETL (Extract, Transform, and Load) package. I've never used it personally, but it might do what you're looking to do as well.

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