en:modul:m290_guko:learningunits:lu06:aufgaben:case_oev

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
en:modul:m290_guko:learningunits:lu06:aufgaben:case_oev [2026/09/23 18:02] – Automatic push translation gkochen:modul:m290_guko:learningunits:lu06:aufgaben:case_oev [2026/09/23 18:12] (aktuell) gkoch
Zeile 9: Zeile 9:
 We would like to **enter, amend and delete VBZ tram routes** from Zurich in our database. We would like to **enter, amend and delete VBZ tram routes** from Zurich in our database.
  
-Your tables: **line**, **stop**, **journey**.+Your tables: **linie**, **haltestelle**, **fahrt**.
  
 ===== Task ===== ===== Task =====
Zeile 15: Zeile 15:
 ==== 1. Insert data records ==== ==== 1. Insert data records ====
  
-**line** (columns: name, operator)+**linie** (columns: name, betreiber)
 <WRAP center box 80% round><code sql> <WRAP center box 80% round><code sql>
 Linie 4, VBZ Linie 4, VBZ
Zeile 24: Zeile 24:
 </code></WRAP> </code></WRAP>
  
-**bus stop** (columns: name, town)+**haltestelle** (columns: name, ort)
 <WRAP center box 80% round><code sql> <WRAP center box 80% round><code sql>
 Bellevue, Zürich Bellevue, Zürich
Zeile 37: Zeile 37:
 </code></WRAP> </code></WRAP>
  
-**journey** (Columns: datedeparture_timepriceroute_id)+**fahrt** (Columns: datumabfahrtszeitpreislinien_id) 
 <WRAP center box 80% round><code sql> <WRAP center box 80% round><code sql>
 ('2026-09-22', '07:15:00', 4.60, 1), ('2026-09-22', '07:15:00', 4.60, 1),
Zeile 47: Zeile 48:
  
 ==== 2. Deliberately breaking the constraint ==== ==== 2. Deliberately breaking the constraint ====
-Try to add a route **without a name** (name is NOT NULL). Read the error message.+ 
 +Try to add a route **without a name**. Read the error message. 
 ==== 3. Modify data ==== ==== 3. Modify data ====
-  - The price for all journeys on line 4 increases to **4.80** – update using WHERE line_id.+  - The price for all journeys on line 4 increases to **4.80** – update using WHERE linien_id.
   - One journey on line 8 is rescheduled: date **and** departure time are changing – select a specific journey (e.g. by combining date and departure time) and change both columns in a single query.   - One journey on line 8 is rescheduled: date **and** departure time are changing – select a specific journey (e.g. by combining date and departure time) and change both columns in a single query.
  
 <WRAP center round tip 80%> <WRAP center round tip 80%>
-First, use SELECT to check how many rows are affected by your WHERE condition – this is particularly important if you’re filtering by line_id, as this may affect several journeys at once.+First, use SELECT to check how many rows are affected by your WHERE condition – this is particularly important if you’re filtering by linien_id, as this may affect several journeys at once.
 </WRAP> </WRAP>
  
-==== 4. Deleting data ====  - A single journey is cancelled – delete it specifically (e.g. by combining date and departure time). +==== 4. Deleting data ====  
-  - All journeys on route 11 will be rescheduled – delete all journeys with ‘line_id’ 2 in one go.+  - A single journey is cancelled – delete it specifically (e.g. by combining date and departure time). 
 +  - All journeys on route 11 will be rescheduled – delete all journeys with ‘linien_id’ 2 in one go.
  
 Remember to carry out a dry run using SELECT before every DELETE. Remember to carry out a dry run using SELECT before every DELETE.
  • en/modul/m290_guko/learningunits/lu06/aufgaben/case_oev.1790179320.txt.gz
  • Zuletzt geändert: 2026/09/23 18:02
  • von gkoch