having the tables:
- company_id: foreign key
- client_id: foreign key
where the relations are:
- Companies and Clients = > 1: N
- Customers and Sales = > 1: N
Considering that I will need to list all the sales of the company, it is worth creating a second foreign key in the sales table so that I can do:
SELECT * FROM 'vendas' WHERE 'empresa_id' = 'x'