Professional Documents
Culture Documents
Relational Model
Relational Model
Relational Model
Athlete (athlete_id, country_id, sport_id, gender, date_of_birth, firstname, lastname); country_id ->
Country(country_id), sport_id -> Sports(sport_id)
Results (result_id, event_id, athlete_id, score, position, measurement); event_id -> Events(event_id),
athlete_id -> Athlete(athlete_id)
attend (athlete_id, event_id, order); athlete_id -> Athlete(athlete_id), event_id -> Events(event_id)
π discipline_name, federation σ sport_name = 'Aquatic' ( Discipline ⨝ Discipline.sport_id = Sports.sport_id Sports )
π country_name, continent, location_name, no_of_events σ no_of_events > 2 and date ≥ '2020-07-23' and date ≤ '2020-08-
08' ( ( ( Country ⨝ Country.country_id = Olympic.country_id Olympic ) ⨝ Olympic.olympiad_id = chooses.olympiad_id ch
ooses ) ⨝ Event_location.location_id = chooses.location_id Event_location )
SELECT firstname, lastname, event_title, score, measurement, position FROM Results INNER
JOIN Athlete ON Results.athlete_id = Athlete.athlete_id INNER JOIN Eventas ON
Eventas.event_id = Results.event_id WHERE Athlete.firstname = 'Rafal'