City
would be the primary key of table2
and a foreign key in Table1
. (But that requires city names to be globally unique and have only a single pincode each).
You need to be sure that a single city
has only one Pincode
.
If that is not the case, probably use the Pincode
as primary/foreign key instead of city
.
Update: Since apparently there are cases where some pincodes span multiple cities, you probably need to live with the redundancy or introduce an artificial key. Also see the links to similar questions here in the comments.