I have a MySQL database with over 40,000 r开发者_如何学JAVAecords I want to import into a new PostgreSQL database; I want to be able to map the values from the old table and column names into new table and column names... how do I do this?
For instance, I want to take this:
Table name: Horribly_Named_Table
=> Horribly_Named_Column: value1
(MySQL)
... and translate it to this:
Table name: better_named_table
=> better_named_column: value1
(PostgreSQL)
I've never done a move like this before, so any help is appreciated!
I recommend using a simple transformation within Pentaho Data Integration: setup is very simple and there is a wizard for loading database base data from one database to another:
See a similar answer here:
Migrate from Oracle to MySQL
If you are only referring to the difference in UPPER/lowercase names, then you don't really need to do something.
Just make sure you are not quoting the table names and they will not be case sensitive.
This_Table_Name
is the same as this_table_name
and that is the same as THIS_TABLE_NAME
.
But "this_table_name"
is something different then "This_Table_Name"
mysqldump has a compatibility mode, check "ansi" and "postgresql".
精彩评论