lundi 4 juillet 2016

Supplier-customer relationship in the same table


I'm no MySQL expert and I have to design a rather complex db for my level.

The problem I'm facing now consist in having a supplier-customer relationship within the same table (macro categories of companies):

Macro table

id    name          mega_id    macro_customer_id
------------------------------------------
1     Furniture     2          2,4,5,35

I want to represent the fact that macro entry with id 1 has other macro companies (which are their customers) described within the same table.

Which is the best way to represent this?

Thanks!


Aucun commentaire:

Enregistrer un commentaire