+1

How to not show foreign keys from dependent tables

accounts sqldbm 3 years ago 0

So if I have a situation where I have 3 tables:

  1. companies
  2. exhibitors
  3. booths

Company has many exhibitors

Exhibitor has many booths.

If Exhibitor has the foreign_key for companies company_id, I just want to create a booths table that has 1 foreign key called exhibitor_id, but when I create the relationship it automatically fetches company_id too. When I try to delete it, it gets generated automatically back.