I'm designing a simple database and I'm stuck with one part. I have a Task
, Sweep
and Spray
entities.
+-------+
| Task |
| |
+-+--+--+
| |
| |
+------+-+ | +--------+
|Spray | +----+ Sweep |
| | | |
+------+ +--------+
Each task is done by either a Sweep
or Spray
or both. Each Spray
and Sweep
has few properties that are only valid for particular Task
(temporal) and may change over time. For example, spray color is yellow for one task and might be green for another task.
How do I design the tables so that I can query the tasks to see which task was done by which spray and sweep with which properties? Like:
task1: spray green | sweep auto
task2: - | sweep manual
task2: spray black | sweep manual
task2: spray blue | -
Task
hold that are common to bothSpray
andSweep
?