Basically I need an scalable efficient way to select all scheduled items so it made sense that the main table is the schedule. The problem is that all the operation tables have different properties
I created a diagram which is obviously wrong but demonstrates what I am trying to achieve.
I was thinking about having the join on the other side so that all three operations pointed to the schedule, but if I do that then to get a complete schedule I have to aggregate all the operation tables. What if I have loads more in the future?
Another option was to have the delivery, maintenance, loading columns in the schedule table but again there could be loads more operations. I'm just wondering of I am missing something or is this the best option?
Best Answer
You can have two fields in schedule table:
Then you can select everything like this:
and the the output of this query would be something like: