Often the first step to develop an application is to create the entities and define the relationships or associations between them. A relationship basically means that one entity holds a reference to another entity. For example, consider the following User…