The field data types on both sides of the foreign key relationship must be identical.
If the key field of the parent table is (say) varchar(20) , then the foreign key fields in the dependent table must also be varchar(20) . That means yes, you should have had X million rows of "Apple" and "Pear" and "Banana" repeating in each table with a foreign key pointing to the fruit table.
As a rule, it is more efficient to use numeric fields as keys (int, bigint), since they can have comparisons with a very small number of CPU instructions (as a rule, it is possible to compare one command with one processor). Strings, on the other hand, require loops and relatively expensive tunings. So yes, you would be better off storing the fruit names in a table somewhere and using their associated numeric ID fields as a foreign key.
Of course you should compare both settings. These are just general rules, and your specific requirements / settings may work faster with the version of strings.
source share