Consider that a journalist wants to create a simple database for covering the 2010 Tour de France cycling race. The race consists of a number of stages identified by a starting and destination city. Each stage is completed on a single date, and goes over a specific number of kilometers. Riders (first name, last name, and date of birth, which together are unique) are employed by a team which is identified by a name and is managed by the team boss. The team boss is not a rider and is identified by his/her name. A team needs to have at least one rider to enroll in the race. Each rider must belong to one and only one team in the race. No two teams are allowed to have the same boss. A team also assigns one specific rider who acts as the team leader in the race. Riders participate in a number of stages (not necessarily all, as they could give up after a number of days) and it is possible that a rider is absent from all stages.
For each stage that a rider participates in, his total time spent from start to finish is recorded. Stages are either Mountain, Flat, or Team Time Trial stages. There are no other kinds of stages. For mountain stages the database keeps track of the grade (= dificulty level), the number of mountains in it, and the best climber (a rider). For a fiat stage we record the number of intermediate sprints. For a team time trial we record which team won the stage.
(a) Draw an Entity-Relationship diagram for this database using UML notation. Be sure to include all the entities mentioned above, together with attributes (including primary key attributes), relationships and multiplicity constraints. Note that generalization/specification will be involved in the ER diagram.
(b) Construct a relational schema for the ER-diagram. Make sure that you correctly translate Specialization and Many-to-Many relationships. Please follow carefully the following guidelines when you finish this question:
Please ONLY include the following entities in the ER diagram: Team, Rider, Stage, Boss, Mountain, Flat and TeamTimeTrial. The last three entities correspond to the three stage types. It is possible that there are more than one relationship between two entities in the diagram; Please only use the attributes given in the instruction. Please do not make up any other attributes yourself or use other names for the attributes; Please only use the drawing tools (e.g., Microsoft Word or Visio) that are available for drawing up the ER diagram. It is not allowed to use those tools for automatic generation of ER diagrams; Always highlight the primary keys for the entities created in the ER diagram and the relations transformed from the ER diagram.