===== LU03S2 – Proposed solution ===== The following entities have been identified for the scenario: **1. Continent** * ContinentID (Primary Key) * ContinentName **2. Country** * CountryID (Primary Key) * CountryName * ContinentID (Foreign Key) **3. Trip** * TripID (Primary Key) * CountryID (Foreign Key) * StartDate * EndDate * Price ===== Relationships ===== * **A continent** can have many countries (**1:N**). * **A country** belongs to exactly one continent (**N:1**). * **A country** can have many trips (**1:N**). * **A journey** takes place in exactly one country (**N:1**). {{de:modul:m290_guko:learningunits:lu03:loesungen:loesung_reisedb.png?direct|}} ===== Notes ===== * The **duration of a trip** can be calculated later: EndDate – StartDate. * The **price** is an attribute of the journey, not of the country or continent. [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]]