Can a foreign key be part of more than one table?

0

IwouldliketoknowifIcanputaforeignkeyinmorethanonetable,forexample,wheretheentity"competitors" in the image is a table and the attribute "id_competidor" is a primary key, and the other entities "competitors_document "," competitors_endereco "," competitor_contact "and" competitors_address "have the foreign key the" id_competitor ", could it be done in this way? If not what better option to make?

    
asked by anonymous 06.12.2017 / 20:22

1 answer

2

@Lone Tomberry, not only can, as it should. Foreign keys or foreign keys, as they are commonly called, guarantee the integrity of a bank's data. Notice the type of relationship between your tables. Here are two reference articles.

SQL: Learn how to use the key primary and foreign key

Rules and Types of Relationships

    
06.12.2017 / 20:38