I have T1
table with Id
and name
columns.
Table T2
with Aggregate_ID
and Element_ID
.
They are crossed
x1:
ID и Name
1 Car
2 Hood
3 Engine
4 Cylinder
5 Wheel
6 tyre
7 rim (car)
8 Rim fixation (Car)
x2:
Aggregate_ID Element_ID
1 2
1 3
1 4
1 5
3 4
5 6
5 7
7 8
I need to select simplest element like 2, 4, 8
Complexity and number of elements can be varied.
How can I do it with recursion?
There is another task:
I need to output all the simplest elements of which consists Wheel.