I have the following entities: Producer, Consumer.
A Producer produces Food for the Consumer. A Consumer consumes Food produced by the Producer.
Now I am tasked to design a schema which maps which consumers can eat food produced by each producer.
As an example, I have Producers p1, p2, p3 and Consumers c1, c2, c3.
c1 c2 c3 p1 N Y N p2 Y N N p3 N N Y where N = No and Y = Yes
Keep in mind that
- the number of consumers and producers will keep growing.
- the default state of whether a consumer can eat food from a new producer is No
How should I define this schema?