Database - Merge tables with different structures

0

My main question is: what is the best way to do it and not what commands to use. What I need, basically, is this:

I have two tables with different structures, in different databases. For example:

Database 1 - Customer table structure: id - name - cpf - phone - salary

Database 2 - Person table structure: people_id - name - email - phone - city - cpf - profession

What I need is to be able to insert data from the first table (customer) into the second table (person). Where, for example, client.id would be associated with the person.id_people; the column client.name would be inserted in the column person.name, client.salario could be defined by the user to not be associated with any column of the person table, but to create this column as a new one ... That is, to associate each column of a table to a column of another table, or creating a new column in the second table, informing association to the association.

Does anyone have any ideas how to do it? The system is being done in PHP.

    
asked by anonymous 14.11.2016 / 11:33

0 answers