如何创建从旧数据库到新数据库结构的表映射 [英] How to create table mapping from old database to new database structure

查看:278
本文介绍了如何创建从旧数据库到新数据库结构的表映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚被我们的首席软件架构师分配了一项任务,它涉及迁移。我应该构建一个数据迁移工具来帮助我们将数据从旧数据库中的现有表迁移到新数据库。



我遇到的挑战是,我们的首席软件架构师给了我一些我不太了解的指示,他目前正在休假。我会在下面粘贴说明我需要的是一个明白他的意思的人,让我明确解释应该做什么,我可以从那里拿走它。



I have just been assigned a task by our Chief Software Architect and it involves migration. I am supposed to be building a data migration tool to help us migrate data from existing tables in an old database to a new database.

The challenge I have is, our Chief Software Architect has given me instructions in terms I don't quite understand and he is currently on leave. I would paste the instructions below what I need is someone who understands what he means to give me a clear explanation of what should be done and I can take it from there..

We need to create a data migration tool for when we launch the new product. Presently we only intend to migrate names, addresses and relationships from the old system to the new.

•	Study the NAMES table and work out a mapping for the names and addresses to the new database structure





我只需要通过



I just need a simple explanation on what he means by

"work out a mapping for the names and addresses to the new database structure"

来简单解释它的含义。 PS:在旧数据库中我们有一个叫做NAMESTable的表。

. PS: IN THE OLD DATABASE WE HAVE A TABLE CALLED NAMESTable.

推荐答案

Map - 可以描述如何从'A'旅行的东西(旧数据库) )到'B'(新数据库)



它只是意味着对于旧数据库NAMES表中的每一列,计算出数据将存储在新数据库中的位置结构体。例如,如果olddatabase.NAMES有列

"Map" - something that can describe how to "travel" from 'A' (old database) to 'B' (new database)

It simply means "for each column in the old database NAMES table work out where that data would be stored in the new database structure". For example if olddatabase.NAMES has columns
ID, 
Name, 
AddressLine1, 
AddressLine2, 
ZipCode



但新数据库有两个表NAME和ADDRESS,然后映射可能是


but the new database has two tables NAME and ADDRESS then the mapping might be

old.NAMES.ID            --> new.NAME.ID
old.NAMES.Name          --> new.NAME.Name
old.NAMES.AddressLine1  --> new.ADDRESS.AddressLine1
old.NAMES.AddressLine2  --> new.ADDRESS.AddressLine2
old.NAMES.ZipCode       --> new.ADDRESS.ZipCode
old.NAMES.ID            --> new.ADDRESS.NameFK



究竟如何描述,定义或使用这些规则取决于您将使用的映射工具。您可能还需要考虑一些数据转换,例如[名称]可能必须分为[FirstName]和[LastName]



我建议在谷歌搜索术语数据库映射或数据映射进一步的细节,根据您使用的SQL版本,对SSIS或DTS进行一些研究(对于旧版本的SQL)



顺便说一下,你的酋长Software Architect将指令写成大学讲师 - 非常奇怪: - )


Exactly how these "rules" are described, defined or used depends rather on the mapping tool you will be using. You may also need to consider some data transformation e.g. [Name] might have to be split into [FirstName] and [LastName]

I would suggest searching google for the term "Database Mapping" or "Data mapping" for further detail and, depending on which version of SQL you are using, do some research into SSIS or DTS (for older versions of SQL)

By the way, your Chief Software Architect writes instructions as if they were a college lecturer - quite strange that :-)


这篇关于如何创建从旧数据库到新数据库结构的表映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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