Foreign keys in database modeling

Asked

Viewed 583 times

0

A primary key can have two foreign keys in different tables? For example:

inserir a descrição da imagem aqui

1 answer

1


The primary key of the Profits table can be foreign/external key of other tables, in this case you have:

Billing

 PK->codFaturamento
 FK->codLucro

Profits

PK->codLucro

Expenses

PK->codDespesa

FK->codLucro

In these cases, a 1:N relationship

Browser other questions tagged

You are not signed in. Login or sign up in order to post.