Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| modul:m290:learningunits:lu03:loesungen:l01 [2024/08/14 13:58] – vdemir | modul:m290:learningunits:lu03:loesungen:l01 [2024/10/17 12:32] (aktuell) – vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== | + | ====== |
| 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: |
| - | *<color # | + | *<color # |
| - | *<color # | + | *<color # |
| - | * product-description up to 255 characters: | + | |
| - | *<color # | + | |
| - | *<color # | + | |
| - | * stock amount: | + | 2. Product-description up to 255 characters: |
| - | * <color #ed1c24>INT or INTEGER</ | + | *<color #ed1c24>VARCHAR(255)</ |
| - | * <color #ed1c24>Floating point type is not suitable as pieces are always counted | + | *<color #ed1c24>The description can be 255 characters, but can also be shorter. A fix length does not make sense in that case. </ |
| - | * price of each piece: | + | 3. Stock amount: |
| - | * <color #ed1c24>FLOAT(5, | + | *<color #ed1c24>INT or INTEGER</ |
| - | * <color #ed1c24>Prices have floating | + | *<color #ed1c24>Floating |
| - | * <color # | + | |
| - | * order date: | + | 4. Price of each piece: |
| - | * <color #ed1c24>DATE or DATETIME</ | + | *<color #ed1c24>FLOAT(6, |
| - | * <color #ed1c24>The type depends on whether we want to safe only the date, but also the time. </ | + | *<color #ed1c24>Prices have floating point</ |
| - | * <color #ed1c24>Usually in such cases to store only the order-date is enough.</ | + | * <color #ed1c24>The length of (6,2) should be sufficient |
| - | | + | 5. Order date: |
| - | * <color # | + | |
| - | * <color # | + | *<color # |
| + | *<color # | ||
| + | |||
| + | 6. Date of delivery: | ||
| + | *<color # | ||
| + | *<color # | ||
| - | * organical | + | 7. organic |
| - | * <color # | + | *<color # |
| - | * <color # | + | *<color # |
| - | + | ||
| - | * usage category with only one character: | + | |
| - | * <color # | + | |
| - | * <color # | + | |
| - | * <color # | + | |
| - | + | ||
| - | ===== Solution ===== | + | |
| - | [[modul: | + | |
| + | 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:// | ||