Foreign Key
Software Engineering · Last updated: July 30, 2026 · How this entry was written
Definition: A foreign key is a column or set of columns in a relational database table that establishes a link between data in two tables. It enforces referential integrity by ensuring that values in the foreign key column match a primary key in another table.
Example in context
“When designing the order table, we added a foreign key referencing the customer table's primary key to ensure each order belongs to a valid customer.”
“Sipariş tablosunu tasarlarken, her siparişin geçerli bir müşteriye ait olmasını sağlamak için müşteri tablosunun birincil anahtarına referans veren bir yabancı anahtar ekledik.”
Where engineers use it
A foreign key is used in relational schema definitions during database design to enforce relationships between entities. An engineer uses it when creating tables or altering schemas to maintain data integrity and prevent orphaned records.
Synonyms: FK
Practice: can you use “Foreign Key” at work?
A junior developer created an order table without linking it to customers. You need to explain why a foreign key is necessary and how to add it to maintain referential integrity.
Show a model answer
“Please ensure the foreign key references the primary key of the parent table.”
“Foreign Key” in 21 languages
| English | Foreign Key |
|---|---|
| Turkish | Yabancı Anahtar |
| French | Clé Étrangère |
| German | Fremdschlüssel |
| Spanish | Clave Foránea |
| Chinese | 外键 |
| Arabic | مفتاح أجنبي |
| Portuguese | Chave Estrangeira |
| Russian | Внешний ключ |
| Japanese | 外部キー |
| Italian | Chiave Esterna |
| Vietnamese | Khóa Ngoại |
| Hindi | विदेशी कुंजी |
| Thai | คีย์ต่างประเทศ |
| Indonesian | Kunci Asing |
| Korean | 외래 키 |
| Bengali | বিদেশী চাবি |
| Dutch | Vreemde Sleutel |
| Swedish | Främmande Nyckel |
| Finnish | Vieras Avain |
| Ukrainian | Зовнішній ключ |
Frequently asked questions
What does Foreign Key mean in engineering?
A foreign key is a column or set of columns in a relational database table that establishes a link between data in two tables. It enforces referential integrity by ensuring that values in the foreign key column match a primary key in another table. In Software Engineering, the term carries a usage-frequency rating of 10/10 in the Engineering English library.
How do you pronounce Foreign Key?
Foreign Key is pronounced /ˈfɒrɪn kiː/ (IPA). The Engineering English app plays audio for the term and checks your pronunciation with speech recognition.
How is Foreign Key used in a sentence?
Example from an engineering context: “When designing the order table, we added a foreign key referencing the customer table's primary key to ensure each order belongs to a valid customer.”
This entry is one of 7,806 terms in the Engineering English iOS app — with quizzes, spaced repetition and pronunciation checking.
Get the app on the App Store