[英]PSQL. Migrating data from one DB to another DB with different table structure
I have data on a PSQL-db that I need to migrate to another PSQL-db.我有一个 PSQL-db 上的数据,我需要迁移到另一个 PSQL-db。 The biggest problem is that the structure of the DB's is different.最大的问题是数据库的结构不同。
So my question is what is the smartest way of doing this kind of migration?所以我的问题是进行这种迁移的最明智的方法是什么?
My initial thoughts was to map where all the data should go in the new DB in a excel sheet and then write some kind of script that inserts the old data into the new DB.我最初的想法是在 Excel 表中映射所有数据应该在新数据库中的位置,然后编写某种脚本将旧数据插入到新数据库中。
This seems a little tedious and i'm wondering if anyone know any tool or methods to make this easier/faster?这似乎有点乏味,我想知道是否有人知道任何工具或方法可以使这更容易/更快?
You can create new table with an extra field that show您可以使用显示的额外字段创建新表
imported进口的
Get data from another db and then create a view of both tables.从另一个数据库获取数据,然后创建两个表的视图。
This may also help you这也可以帮助你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.