en:modul:m290_guko:learningunits:lu06:aufgaben:case_tierheim

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_tierheim [2026/09/23 17:56] – Automatic push translation gkochen: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://tierschutz-luzern.ch/tierheim-an-der-ron/|tierschutz-luzern.ch]]) in our database.+We would like to help animals at the **Ron Animal Shelter** in Root (LU) that are up for adoption ([[https://tierschutz-luzern.ch/tierheim-an-der-ron/|tierschutz-luzern.ch]]) in our database.
  
-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><code sql> <WRAP center box 80% round><code sql>
 Hund, Weltweit domestiziert Hund, Weltweit domestiziert
Zeile 24: Zeile 24:
 </code></WRAP> </code></WRAP>
  
-**enclosure** (columns: name, locationarea)+**gehege** (columns: name, standortflaeche)
 <WRAP center box 80% round><code sql> <WRAP center box 80% round><code sql>
 Hundeaussenbereich 1, Garten, 45.50 Hundeaussenbereich 1, Garten, 45.50
Zeile 33: Zeile 33:
 </code></WRAP> </code></WRAP>
  
-**Animal** (Columns: name, date_of_birthgenderenclosure_idspecies_id)+**tier** (Columns: name, geburtsdatumgeschlechtgehege_idart_id)
 <WRAP center box 80% round><code sql> <WRAP center box 80% round><code sql>
 ('Zuki', '2024-04-01', 'w', 2, 3), ('Zuki', '2024-04-01', 'w', 2, 3),
Zeile 44: Zeile 44:
  
 ==== 2. Deliberately violating a constraint ==== ==== 2. Deliberately violating a constraint ====
-Try to add an animal **without a name** (name is NOT NULL). Read the error message.+Try to create an animal **without a name**. Read the error message.
  
-==== 3. Modify data ====+==== 3. Modifying data ====
   - 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` condition that matches both at the same time.+  - 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` clause that matches both at the same time.
  
 <WRAP center round tip 80%> <WRAP center round tip 80%>
-Filter by name, e.g. ''WHERE name = 'Mila' ''. For both animals at the same time, you could use, for example''WHERE name = 'Luigi' OR name = 'Fred' ''. Use SELECT beforehand to check how many rows are affected.+Filter by name, e.g. ''WHERE name = 'Mila' ''. For both animals at the same time, you could use, for example''WHERE name = 'Luigi' OR name = 'Fred' ''. Use SELECT beforehand to check how many rows are affected.
 </WRAP> </WRAP>
  
 ==== 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 that matches both at the same time.+  - Zuki and Sokka are being rehomed together – delete both records using a WHERE condition that matches both at the same time.
  
-Remember to carry out a dry run using SELECT before every DELETE.+Remember to carry out a dry run with SELECT before every DELETE.
  
 ---- ----
  • en/modul/m290_guko/learningunits/lu06/aufgaben/case_tierheim.1790178989.txt.gz
  • Zuletzt geändert: 2026/09/23 17:56
  • von gkoch