简体   繁体   English

PSQL。 将数据从一个数据库迁移到具有不同表结构的另一个数据库

[英]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这也可以帮助你

Data Import Tip 数据导入提示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用查询将数据从一个db的表复制到另一个db的表中(两个表具有相同的结构) - Copy data from table of one db into table of another db using query (both tables have same structure) 仅将更新的表数据从一个数据库复制到另一数据库 - Copy only updated table data from one DB to another DB 将数据从一个DB复制到另一个DB - copying data from one DB to another DB 将不同数据库表中的数据插入同一服务器中的另一个数据库 - Inserting data from different dbs table to another db in the same server 将数据从一个表导出到具有不同结构的另一个表 - Exporting data from one table into another table with a different structure 如何将数据从一个数据库迁移到另一个具有不同结构的数据库? - How can I go about migrating data from one database to another with different structure? 每天将数据从一个数据库中的源表传输到另一个数据库中的目标表的最佳方法 - Best way to transfer data from source table in one db to destination table in another db daily 使用python在另一个数据库上创建一个相似的表 - Create a similar table from one DB on another DB using python 将表数据从一个数据库复制到具有条件的另一个数据库 - copy table data from one db to another with where condition 如何将表结构和数据从db1覆盖到db2 - How to overwrite table structure and data from db1 to db2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM