Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| en:modul:m290_guko:learningunits:lu06:aufgaben:case_oev [2026/09/23 18:02] – Automatic push translation gkoch | en: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>< | <WRAP center box 80% round>< | ||
| Linie 4, VBZ | Linie 4, VBZ | ||
| Zeile 24: | Zeile 24: | ||
| </ | </ | ||
| - | **bus stop** (columns: name, town) | + | **haltestelle** (columns: name, ort) |
| <WRAP center box 80% round>< | <WRAP center box 80% round>< | ||
| Bellevue, Zürich | Bellevue, Zürich | ||
| Zeile 37: | Zeile 37: | ||
| </ | </ | ||
| - | **journey** (Columns: | + | **fahrt** (Columns: |
| <WRAP center box 80% round>< | <WRAP center box 80% round>< | ||
| (' | (' | ||
| Zeile 47: | Zeile 48: | ||
| ==== 2. Deliberately breaking the constraint ==== | ==== 2. Deliberately breaking the constraint ==== | ||
| - | Try to add a route **without a name** | + | |
| + | 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: | - One journey on line 8 is rescheduled: | ||
| <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. |
| </ | </ | ||
| - | ==== 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. | ||