Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
modul:m290:learningunits:lu03:loesungen:l01 [2024/08/14 12:59] – angelegt vdemir | modul:m290:learningunits:lu03:loesungen:l01 [2024/10/17 12:32] (aktuell) – vdemir | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
- | |||
- | ===== Task a) Choose datatypes ==== | ||
Which datatype would you use to store the following information? | Which datatype would you use to store the following information? | ||
- | * product-title like trousers up to 50 characters: | + | 1. Product-title like trousers up to 50 characters: |
- | * VARCHAR(50) | + | *<color #ed1c24>VARCHAR(50)</ |
- | * Titles can be at the most 50 characters. A fix length | + | *<color #ed1c24>Titles can be at the most 50 characters. A fix length |
- | * product-description up to 255 characters: | + | |
- | * VARCHAR(255) | + | |
- | * The description can be 255 characters, but can also be shorter. A fix length does not make sense in that case. | + | |
- | * stock amount: | + | |
- | * INT or INTEGER | + | |
- | * Floating point type is not suitable as pieces are always counted in whole numbers. | + | |
- | * price of each piece: | + | |
- | * Prices have floating point | + | |
- | * The data-type FLOAT (5,2) should be sufficient enough as trousers are usually within a price ranger of 0.99 to 999.99. | + | |
- | * order date: | + | |
- | * date of delivery: | + | |
- | * whether organical or not: | + | |
- | * usage category with only one character: | + | |
- | ===== Solution ===== | + | 2. Product-description up to 255 characters: |
- | [[modul: | + | |
+ | *<color # | ||
+ | 3. Stock amount: | ||
+ | *<color # | ||
+ | *<color # | ||
+ | |||
+ | 4. Price of each piece: | ||
+ | *<color # | ||
+ | *<color # | ||
+ | * <color # | ||
+ | |||
+ | 5. Order date: | ||
+ | *<color # | ||
+ | *<color # | ||
+ | *<color # | ||
+ | |||
+ | 6. Date of delivery: | ||
+ | *<color # | ||
+ | *<color # | ||
+ | |||
+ | 7. organic or not: | ||
+ | *<color # | ||
+ | *<color # | ||
+ | |||
+ | 8. Usage category with only one character: | ||
+ | * <color # | ||
+ | * <color # | ||
+ | * <color # | ||
===== Vocabulary ===== | ===== Vocabulary ===== | ||
^ English ^ German ^ | ^ English ^ German ^ | ||
- | | respectively | + | | to give reason for | begründen | |
+ | | at the most | höchstens | | ||
+ | | stock amount | Lagermenge | | ||
+ | | to float | fliessen | | ||
+ | | sufficient | ausreichend | | ||
+ | | regarding | bezüglich | | ||
+ | | might be | möglicherweise | | ||
+ | | technically | im Prinzip, eigentlich | ||
---- | ---- | ||
+ | |||
[[https:// | [[https:// |