MySQL Forums
Forum List  »  Newbie

Foreign key must always be the primary key in the other table?
Posted by: Nuno MIguel
Date: July 23, 2016 05:10AM

Hi,

Foreign key must always be the primary key in the other table?

I ask this because I want to send data from a database that is in various mobile devices to one unique database in the web, and doing this my foreign keys don't updater with the new primary keys that are generated by the AUTO_INCREMENT in the database in the web.

By defining a foreign key, and respective field in the other table, thar where unique to the mobile device, when I send this information to the main database in the web this problem was solved, because the foreign keys don't needed to be updated.

What do you think?

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.