Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| en:modul:m290_guko:learningunits:lu06:aufgaben:case_tierheim [2026/09/23 17:56] – Automatic push translation gkoch | en:modul:m290_guko:learningunits:lu06:aufgaben:case_tierheim [2026/09/23 18:00] (aktuell) – gkoch | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== LU06 – Project: Animal Shelter on the River Ron ====== | + | ====== LU06 - Assignment: Animal Shelter on the Ron ====== |
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| Zeile 7: | Zeile 7: | ||
| ===== Background ===== | ===== Background ===== | ||
| - | We would like to help animals at the **Ron Animal Shelter** in Root (LU) are up for adoption ([[https:// | + | We would like to help animals at the **Ron Animal Shelter** in Root (LU) that are up for adoption ([[https:// |
| - | Your tables: **enclosures**, **animal species**, **animal**. | + | Your tables: **gehege**, **tierart**, **tier**. |
| ===== Task ===== | ===== Task ===== | ||
| Zeile 15: | Zeile 15: | ||
| ==== 1. Insert data records ==== | ==== 1. Insert data records ==== | ||
| - | **animal-type** (columns: name, origin) | + | **tierart** (columns: name, herkunft) |
| <WRAP center box 80% round>< | <WRAP center box 80% round>< | ||
| Hund, Weltweit domestiziert | Hund, Weltweit domestiziert | ||
| Zeile 24: | Zeile 24: | ||
| </ | </ | ||
| - | **enclosure** (columns: name, location, area) | + | **gehege** (columns: name, standort, flaeche) |
| <WRAP center box 80% round>< | <WRAP center box 80% round>< | ||
| Hundeaussenbereich 1, Garten, 45.50 | Hundeaussenbereich 1, Garten, 45.50 | ||
| Zeile 33: | Zeile 33: | ||
| </ | </ | ||
| - | **Animal** (Columns: name, date_of_birth, gender, enclosure_id, species_id) | + | **tier** (Columns: name, geburtsdatum, geschlecht, gehege_id, art_id) |
| <WRAP center box 80% round>< | <WRAP center box 80% round>< | ||
| (' | (' | ||
| Zeile 44: | Zeile 44: | ||
| ==== 2. Deliberately violating a constraint ==== | ==== 2. Deliberately violating a constraint ==== | ||
| - | Try to add an animal **without a name** | + | Try to create |
| - | ==== 3. Modify | + | ==== 3. Modifying |
| - An input error has been detected for Mila: she is actually housed in a different enclosure – change her enclosure_id to **2**. | - An input error has been detected for Mila: she is actually housed in a different enclosure – change her enclosure_id to **2**. | ||
| - | - Luigi and Fred are being moved together to a new enclosure **and** their species is being corrected, as they are actually rabbits rather than dogs – change the ‘gehege_id’ for both to 2 **and** `art_id` to 3. To do this, use a `WHERE` | + | - Luigi and Fred are being moved together to a new enclosure **and** their species is being corrected, as they are actually rabbits rather than dogs – change the ‘gehege_id’ for both to 2 **and** `art_id` to 3. To do this, use a `WHERE` |
| <WRAP center round tip 80%> | <WRAP center round tip 80%> | ||
| - | Filter by name, e.g. '' | + | Filter by name, e.g. '' |
| </ | </ | ||
| ==== 4. Deleting data ==== | ==== 4. Deleting data ==== | ||
| - Bäry has been successfully rehomed – delete his record specifically by name. | - Bäry has been successfully rehomed – delete his record specifically by name. | ||
| - | - Zuki and Sokka are being rehomed together – delete both records using a WHERE clause | + | - Zuki and Sokka are being rehomed together – delete both records using a WHERE condition |
| - | Remember to carry out a dry run using SELECT before every DELETE. | + | Remember to carry out a dry run with SELECT before every DELETE. |
| ---- | ---- | ||