I have a set of entities that can have child entities which themselves have child entities and they have child entities .... etc. The problem is that the number of subsequent child entities is not constant between entities.
Example:
Car has an engine, the engine have multiple components which may comprise multiple parts and the parts my have smaller parts
As stated above, the number of subsequent child entities cascading down is different for instance between a Train and a Car, so I cannot create indefinite child tables for each parent.
My question is, what is the most efficient way to store such data and maintain a relationship between each parent and subsequent child? An example will be much appreciated.