Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
modul:m290:learningunits:lu03:loesungen:l02 [2024/08/14 15:18] – angelegt vdemirmodul:m290:learningunits:lu03:loesungen:l02 [2024/10/02 15:13] (aktuell) vdemir
Zeile 1: Zeile 1:
-====== LU03.L02 Designing an ERD ======+====== LU04.S02 ERM: Travel DB ======
  
-===== Given business case ===== +For this scenario, the following entity(-types) are identified:
-As overreaching goalwe want to administrate our holidays. Though we want to store the following information: +
-  * which countries we visited so far +
-  * how long we stayed in each country +
-  * on which continent each country is located +
-  * the price for each trip +
-  * the date of each trip+
  
-===== Task: Design a ERD  ==== +1. Country 
-Analyse the given business case and design an ERD that matches the requirements of the business case.+  * Attributes 
 +    * CountryID (Primary Key) 
 +    * CountryName 
 +    * ContinentName
  
-===== Solution ===== +2. Trip 
-Based on the given information, we can identify three primary entity-types:+  * Attributes 
 +    * TripID (Primary Key) 
 +    * CountryID (Foreign Key) 
 +    * StartDate 
 +    * EndDate 
 +    * Price 
 +  * Relationships: 
 +    * Country: A trip occurs in one country. 
 +    * Duration: Calculated as the difference between EndDate and StartDate.
  
-  * **Trip**: Represents a single holiday journey. +3Continent 
-    * trip_id (primary key) +  * Attributes:  
-    * start_date +    * ContinentID (Primary Key
-    * end_date +    * ContinentName 
-    * cost +  * Relationships
-  * **CountryRepresents a country visited. +    * Country: Each country is located on one continent.
-    * country_code (primary key+
-    * country_name +
-    * continent +
-  * VisitRepresents a visit to a specific country within a trip. +
-    * visit_id (primary key) +
-    * trip_id (foreign key to Trip) +
-    * country_code (foreign key to Country+
-    * number_of_days+
  
 +4. Relationships:
 +  * One-to-Many:
 +    * A Continent can have many Countries.
 +    * A Country can have many Trips.
  
-===== Vocabulary ===== 
-^ English ^ German ^  
-| prerequite | Grundvoraussetzung | 
  
 +5. ERM in Crow's feet notation 
 +  * Continent (1) ————< has >———— (∞) Country
 +  * Country (1) ————< hosts >———— (∞) Trip
  
 +{{:modul:m290:learningunits:lu03:loesungen:lu03.l02.png?1000|}}
 +
 +===== Vocabulary =====
 +^ English ^ German ^ 
 +| prerequisite | Grundvoraussetzung |
 +| given| gegebene, vorausgesetzt |
  
 ---- ----
 [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir
  • modul/m290/learningunits/lu03/loesungen/l02.1723641522.txt.gz
  • Zuletzt geändert: 2024/08/14 15:18
  • von vdemir