educative.io

Educative

Why is Aircarft associated to Flight instead of Flight Instance?

How can an Aircraft be associated to a Flight?
According to the diagram, A flight can have many flight instances, so logically each flight instance will involve an association with one Aircraft, and one Aircraft can serve multiple flight instances.
So, should there not be a one to many Association between Aircraft and Flight Instance?
Aircraft (1) … Flight Instance (*)

How can Flight be associated to a single Aircraft as per the diagram, since a Single Flight itself has many Flight instances…?
@Educative @Educative_Team please help


Type your question above this line.

Course: https://www.educative.io/collection/5668639101419520/5692201761767424
Lesson: https://www.educative.io/collection/page/5668639101419520/5692201761767424/6235413119238144

The relationship between Aircraft and Flight is one to many. An Aircraft can serve multiple Flights but a Flight is assigned one Aircraft at a given time. Whenever a Flight instance is created it inherits the Aircraft from its parent so the Aircraft is a parent property.