<Table> <Tr> <Td> </Td> <Td> This article's lead section may be too long for the length of the article . Please help by moving some material from it into the body of the article . Please read the layout guide and lead section guidelines to ensure the section will still be inclusive of all essential details . Please discuss this issue on the article's talk page . (June 2018) </Td> </Tr> </Table> <Tr> <Td> </Td> <Td> This article's lead section may be too long for the length of the article . Please help by moving some material from it into the body of the article . Please read the layout guide and lead section guidelines to ensure the section will still be inclusive of all essential details . Please discuss this issue on the article's talk page . (June 2018) </Td> </Tr> <P> In the context of relational databases, a foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table or the same table . In simpler words, the foreign key is defined in a second table, but it refers to the primary key or a unique key in the first table . For example, a table called Employees has a primary key called employee_id . Another table called Employee Details has a foreign key which references employee_id in order to uniquely identify the relationship between the two tables . </P>

When is a foreign key not needed in a relational table design